Example #1
0
 public TypeRenamerState()
 {
     existingNames = new ExistingNames();
     namespaceToNewName = new Dictionary<string, string>(StringComparer.Ordinal);
     createNamespaceName = new NameCreator("ns");
     globalTypeNameCreator = new GlobalTypeNameCreator(existingNames);
     internalTypeNameCreator = new TypeNameCreator(existingNames);
 }
Example #2
0
        public TypeNameCreator(ExistingNames existingNames)
        {
            this.existingNames = existingNames;
            createUnknownTypeName = createNameCreator("Type");
            createEnumName = createNameCreator("Enum");
            createStructName = createNameCreator("Struct");
            createDelegateName = createNameCreator("Delegate");
            createClassName = createNameCreator("Class");
            createInterfaceName = createNameCreator("Interface");

            var names = new string[] {
                "Exception",
                "EventArgs",
                "Attribute",
                "Form",
                "Dialog",
                "Control",
            };
            foreach (var name in names)
                nameInfos.add(name, createNameCreator(name));
        }
Example #3
0
 public GlobalTypeNameCreator(ExistingNames existingNames)
     : base(existingNames)
 {
 }
Example #4
0
 public void merge(ExistingNames other)
 {
     foreach (var key in other.allNames.Keys)
         allNames[key] = true;
 }