示例#1
0
 internal void AddParm(DefineVariableNode variable)
 {
     ParmDefinition.Add(variable);
     if (Structure.Name == Name)
     {
         NameWithParms = IsStatic ? ".cctor" : ".ctor";
         NameWithParms = ParmDefinition.Aggregate(NameWithParms,
                                                  (current, defineVariableNode) => current + "#" + defineVariableNode.TypeName);
         return;
     }
     NameWithParms += "#" + variable.TypeName;
 }
示例#2
0
        public FunctionDefinition(CustomDefinition structure, string name, AccessLevel accessLevel, bool isStatic)
        {
            Name        = name;
            AccessLevel = accessLevel;
            IsStatic    = isStatic;
            Structure   = structure;

            if (Structure.Name == Name)
            {
                NameWithParms = IsStatic ? ".cctor" : ".ctor";
                NameWithParms = ParmDefinition.Aggregate(NameWithParms,
                                                         (current, defineVariableNode) => current + "#" + defineVariableNode.TypeName);
                return;
            }
            NameWithParms  = Name;
            NameWithParms += ParmDefinition.Aggregate(NameWithParms,
                                                      (current, defineVariableNode) => current + "#" + defineVariableNode.TypeName);
        }