Exemplo n.º 1
0
        private void OutputParameter(string ns, ParameterInfo param)
        {
            string paramTypeFullName = WFCGenUEGenerator.GetUnrefTypeName(param.ParameterType);

            if (param.ParameterType.IsByRef)
            {
                Output("ByRef ");
            }
            else
            {
                Output("ByVal ");
            }

            Output(param.Name);
            OutputTypeRefParens(ns, paramTypeFullName);
            Output(" As ");
            OutputTypeRef(ns, paramTypeFullName, false);
        }
 private void OutputParameter(string ns, ParameterInfo param)
 {
     if (param.ParameterType.IsByRef)
     {
         Output("ref ");
     }
     else
     {
         if (param.IsIn)
         {
             Output("in ");
         }
         if (param.IsOut)
         {
             Output("out ");
         }
     }
     OutputTypeRef(ns, WFCGenUEGenerator.GetUnrefTypeName(param.ParameterType));
     Output(param.Name);
 }
Exemplo n.º 3
0
        /// <include file='doc\WFCGenUEMain.uex' path='docs/doc[@for="WFCGenUEMain.WFCGenUEMain"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public WFCGenUEMain(string[] args)
        {
            Environment.ExitCode = 0;

            if (ProcessArgs(args))
            {
                StreamWriter sw = null;

                if (xmlFilename != null && xmlFilename.Length > 3)
                {
                    FileStream fs = new FileStream(xmlFilename, FileMode.Create, FileAccess.ReadWrite);
                    sw = new StreamWriter(fs);
                }

                try {
                    string[] searchExprs = null;

                    if (searchCount != 0)
                    {
                        searchExprs = new string[searchCount];
                        Array.Copy(searchStrings, searchExprs, searchExprs.Length);
                    }

                    string[] temp = new string[docfiles.Count];
                    docfiles.CopyTo(temp, 0);
                    WFCGenUEGenerator gen = new WFCGenUEGenerator(sw, searchExprs, regex, namespaces, includeAllMembers, modules, csxpath, temp);
                    if (individualFiles)
                    {
                        gen.EnableIndividualFiles(indivDirectory, indivExtension);
                    }
                    gen.Generate();
                }
                finally {
                    if (sw != null)
                    {
                        sw.Close();
                    }
                }
            }
        }
Exemplo n.º 4
0
        // BL changes }}

        // BL changes {{
        private void OutputParameter(string ns, ParameterInfo param, bool bName)
        {
            bName = (bName || !param.Name.Equals("value"));

            /*
             * if ( param.IsOut )
             * ; // Output( "__out " );
             * else if ( param.ParameterType.IsByRef )
             * Output( "__byref " );
             * else
             */
            if (param.IsIn)
            {
                Output("__in ");
            }

            string strType = WFCGenUEGenerator.GetUnrefTypeName(param.ParameterType);

            if (param.IsOut || param.ParameterType.IsByRef)     // Add the second "*"
            {
                OutputTypeRef(ns, param.ParameterType, strType, false);
                Output("* ");
            }
            else
            {
                OutputTypeRef(ns, param.ParameterType, strType, bName);
            }

            if (bName)
            {
                Output(param.Name);
            }

            if (strType.EndsWith("[]"))
            {
                Output("[]");
            }
        }
        private void OutputParameter(string ns, ParameterInfo param, bool bShowType)
        {
            if (!param.ParameterType.IsByRef)
            {
                if (param.IsIn)
                {
                    Output("in ");
                }

                /*
                 * There's no JScript equivalent for the C# keyword 'out'
                 * if ( param.IsOut )
                 * Output( "out " );
                 */
            }

            Output(param.Name);
            if (bShowType)
            {
                Output(" : ");
                OutputTypeRef(ns, WFCGenUEGenerator.GetUnrefTypeName(param.ParameterType));
            }
        }