AddMember() public method

public AddMember ( string identifierName ) : string
identifierName string
return string
        public static CodeSnippetTypeMember CreateXRootGetter(string typeName, string fqTypeName, LocalSymbolTable lst)
        {
            string symbolName = lst.AddMember(typeName);
            CodeSnippetTypeMember castMember = new CodeSnippetTypeMember();

            string[] strArrays = new string[] { "\r\n", "    public ", fqTypeName, " ", symbolName, " {  get {", "return rootObject as ", fqTypeName, "; } }" };
            castMember.Text = string.Concat(strArrays);
            return(castMember);
        }
示例#2
0
        public static CodeSnippetTypeMember CreateXRootGetter(string typeName, string fqTypeName, LocalSymbolTable lst,
                                                              GeneratedTypesVisibility visibility = GeneratedTypesVisibility.Public)
        {
            string symbolName = lst.AddMember(typeName);
            CodeSnippetTypeMember castMember = new CodeSnippetTypeMember();

            castMember.Text = String.Concat("\r\n", $"\t\t{visibility.ToKeyword()} ", fqTypeName, " ", symbolName, " {  get {",
                                            "return rootObject as ", fqTypeName, "; } }");
            return(castMember);
        }
示例#3
0
 public static CodeSnippetTypeMember CreateXRootGetter(string typeName, string fqTypeName, LocalSymbolTable lst) {
     string symbolName = lst.AddMember(typeName);
     CodeSnippetTypeMember castMember = new CodeSnippetTypeMember();
     
         castMember.Text = String.Concat("\r\n", "    public ", fqTypeName, " ", symbolName, " {  get {", 
                                                     "return rootObject as ", fqTypeName,"; } }");
     return castMember;
 }