public StockAttributeObfuscation()
        {
            Type = new SolutionProjectLanguageType
            {
                Namespace = "System",
                Name      = "Obfuscation"
            };

            var set_Feature = new SolutionProjectLanguageMethod
            {
                IsProperty    = true,
                Name          = "set_Feature",
                DeclaringType = Type
            };
            var merge = new PseudoStringConstantExpression
            {
                Value = "merge"
            };

            var p = new Dictionary <SolutionProjectLanguageMethod, object>
            {
                { set_Feature, merge }
            };

            this.Properties = p;
        }
Пример #2
0
        public ApplicationToDocumentTitleExpression()
        {
            //this.Comment = (InteractiveComment)"Update document title";



            this.Method = new KnownStockTypes.ScriptCoreLib.JavaScript.Extensions.JavaScriptStringExtensions.ToDocumentTitle();


            this.Title = new PseudoStringConstantExpression {
                Value = "Hello world"
            };

            this.ParameterExpressions = new[] {
                this.Title
            };
        }
        public WebMethod2Expression()
        {
            // https://sites.google.com/a/jsc-solutions.net/backlog/knowledge-base/2014/201406/20140602

            // PHP does not yet support XLinq
            // Java does not yet support Generics



            // note: this method will run under javascript

            #region Parameters e y
            var _e = new SolutionProjectLanguageArgument
            {
                Type = new KnownStockTypes.System.String(),

                Name    = "e",
                Summary = "A parameter from javascript. JSC supports string data type for all platforms."
            };

            var _y = new SolutionProjectLanguageArgument
            {
                Type = new KnownStockTypes.ScriptCoreLib.Delegates.StringAction(),

                Name    = "y",
                Summary = "A callback to javascript. In the future all platforms will allow Action<XElementConvertable> delegates."
            };
            #endregion


            this.Comment = (InteractiveComment)"Send something back from WebMethod2";

            this.Object = new PseudoCallExpression
            {
                Object = _e.Name,

                Method = new SolutionProjectLanguageMethod
                {
                    DeclaringType = new KnownStockTypes.System.Xml.Linq.XElement(),
                    Name          = "Element"
                },

                ParameterExpressions = new[] {
                    new PseudoCallExpression {
                        Method = new SolutionProjectLanguageMethod
                        {
                            DeclaringType = new SolutionProjectLanguageType
                            {
                                Namespace = "System.Xml.Linq",
                                Name      = "XName"
                            },
                            IsStatic = true,
                            Name     = SolutionProjectLanguageMethod.op_Implicit
                        },
                        ParameterExpressions = new []
                        {
                            new PseudoStringConstantExpression {
                                Value =
                                    "Data"
                            }
                        }
                    }
                }
            };

            this.Method = new SolutionProjectLanguageMethod
            {
                DeclaringType = new KnownStockTypes.System.Xml.Linq.XElement(),
                Name          = "ReplaceAll"
            };

            this.Title = new PseudoStringConstantExpression {
                Value = "Data from the web server"
            };

            ParameterExpressions = new[] {
                this.Title
            };
        }
 public StockAttributeGeneralInformation(SolutionProjectLanguageType Type, PseudoStringConstantExpression Constant)
 {
     this.Type       = Type;
     this.Parameters = new[] { Constant };
 }