protected override string GetObjcSignature(bool includeParamNames)
        {
            var objc = new StringBuilder(BaseName);

            var end = FirstDefaultParameter == -1 ? Parameters.Length : FirstDefaultParameter;

            for (int n = 0; n < end; ++n)
            {
                ParameterInfo p = Parameters[n];

                if (includeParamNames)
                {
                    if (objc.Length > BaseName.Length)
                    {
                        objc.Append(' ');
                    }
                }

                string paramName = FallBackToTypeName ? NameGenerator.GetParameterTypeName(p.ParameterType) : p.Name;
                if (n == 0)
                {
                    objc.Append(paramName.PascalCase());
                }
                else
                {
                    objc.Append(paramName.CamelCase());
                }

                if (includeParamNames)
                {
                    string ptname = NameGenerator.GetObjCParamTypeName(p, Processor.Types);
                    objc.Append(":(").Append(ptname).Append(")").Append(NameGenerator.GetExtendedParameterName(p, Parameters));
                }
                else
                {
                    objc.Append(":");
                }
            }

            return(objc.ToString());
        }
Ejemplo n.º 2
0
        public string GetMonoSignature()
        {
            var mono = new StringBuilder(Constructor.Name);

            mono.Append('(');

            var end = FirstDefaultParameter == -1 ? Parameters.Length : FirstDefaultParameter;

            for (int n = 0; n < end; ++n)
            {
                if (n > 0)
                {
                    mono.Append(',');
                }
                mono.Append(NameGenerator.GetMonoName(Parameters[n].ParameterType));
            }

            mono.Append(')');

            return(mono.ToString());
        }