Cloudinary.Transformations.TransformationExtensions.Chain C# (CSharp) Метод

Chain() публичный статический Метод

public static Chain ( this first, ITransformation second ) : ITransformation
first this
second ITransformation
Результат ITransformation
        public static ITransformation Chain(this ITransformation first, ITransformation second)
        {
            if(first == null)
                throw new ArgumentNullException("first");

            if(second == null)
                throw new ArgumentNullException("second");

            // check if first is chained
            ChainedTransformation chained = first as ChainedTransformation;

            // no? try second argument
            if(chained == null)
            {
                chained = second as ChainedTransformation;
            }

            if(chained != null)
            {
                chained.Add(second);
                return chained;
            }

            return new ChainedTransformation(first, second);
        }
TransformationExtensions