Ejemplo n.º 1
0
        public object Clone()
        {
            ProviderAssembly provider = new ProviderAssembly();

            provider.AssemblyName     = AssemblyName != null ? (string)AssemblyName.Clone(): null;
            provider.ClassName        = ClassName != null ? (string)ClassName.Clone(): null;
            provider.FullProviderName = FullProviderName != null ? (string)FullProviderName.Clone() : null;
            return(provider);
        }
Ejemplo n.º 2
0
        public object Clone()
        {
            Provider provider = new Provider();

            provider.ProviderName     = ProviderName != null ? (string)ProviderName.Clone() : null;
            provider.AssemblyName     = AssemblyName != null ? (string)AssemblyName.Clone(): null;
            provider.ClassName        = ClassName != null ? (string)ClassName.Clone(): null;
            provider.FullProviderName = FullProviderName != null ? (string)FullProviderName.Clone() : null;
            provider.Parameters       = Parameters != null?Parameters.Clone() as Parameter[] : null;

            return(provider);
        }
Ejemplo n.º 3
0
        public ComponentInfo Copy()
        {
            List <HelperRectangle> newRectangles = new List <HelperRectangle>();

            foreach (HelperRectangle rect in HelperRectangles)
            {
                newRectangles.Add(rect.Copy());
            }

            Dictionary <string, ComponentProperty> newProperties = new Dictionary <string, ComponentProperty>();

            foreach (KeyValuePair <string, ComponentProperty> pair in Properties)
            {
                newProperties.Add((string)pair.Key.Clone(), pair.Value.Copy());
            }

            var newComponent = new ComponentInfo((string)RealName.Clone(), (string)ClassName.Clone(), DefaultAnimation.Copy(), (string)AnimationProperty.Clone(), newRectangles, newProperties);

            newComponent.SetAnimKey        = (string)SetAnimKey.Clone();
            newComponent._CurrentAnimation = _CurrentAnimation;

            return(newComponent);
        }