示例#1
0
        protected override void InitPlugInBuilderProperty(ChoPlugInBuilderProperty plugInBuilderProperty)
        {
            if (plugInBuilderProperty == null)
            {
                return;
            }

            base.InitPlugInBuilderProperty(plugInBuilderProperty);

            ChoVBNETCodeSnippetPlugInBuilderProperty o = plugInBuilderProperty as ChoVBNETCodeSnippetPlugInBuilderProperty;

            if (o == null)
            {
                return;
            }

            o.CodeSnippet = CodeSnippet.GetValue();
            o.Arguments   = Arguments.GetValue();
            o.Namespaces  = Namespaces;
        }
示例#2
0
        protected override bool ApplyPropertyValues(ChoPlugInBuilderProperty plugInBuilderProperty, string propertyName)
        {
            if (plugInBuilderProperty == null)
            {
                return(false);
            }
            if (base.ApplyPropertyValues(plugInBuilderProperty, propertyName))
            {
                return(true);
            }

            ChoVBNETCodeSnippetPlugInBuilderProperty o = plugInBuilderProperty as ChoVBNETCodeSnippetPlugInBuilderProperty;

            if (o == null)
            {
                return(false);
            }

            if (propertyName == "CodeSnippet")
            {
                CodeSnippet = new ChoCDATA(o.CodeSnippet);
            }
            else if (propertyName == "Arguments")
            {
                Arguments = o.Arguments;
            }
            else if (propertyName == "Namespaces")
            {
                Namespaces = o.Namespaces;
            }
            else
            {
                return(false);
            }

            return(true);
        }