Пример #1
0
        /// <summary>
        /// Applies a <see cref="Transform"/> to a given <see cref="ITransformable"/>.
        /// </summary>
        /// <typeparam name="TThis">The type of the <see cref="ITransformable"/> to apply the <see cref="Transform"/> to.</typeparam>
        /// <param name="t">The <see cref="ITransformable"/> to apply the <see cref="Transform{TValue, T}"/> to.</param>
        /// <param name="transform">The transform to use.</param>
        /// <returns>A <see cref="TransformSequence{T}"/> to which further transforms can be added.</returns>
        public static TransformSequence <TThis> TransformTo <TThis>(this TThis t, Transform transform) where TThis : ITransformable
        {
            var result = new TransformSequence <TThis>(t);

            result.Add(transform);
            t.AddTransform(transform);
            return(result);
        }