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",
                "Stream",
            };

            foreach (var name in names)
            {
                nameInfos.Add(name, CreateNameCreator(name));
            }
        }
Example #2
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 #3
0
 public void merge(ExistingNames other)
 {
     foreach (var key in other.allNames.Keys)
     {
         allNames[key] = true;
     }
 }
Example #4
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 #5
0
 public TypeRenamerState()
 {
     //#XDO Rename
     existingNames       = new ExistingNames();
     namespaceToNewName  = new Dictionary <string, string>(StringComparer.Ordinal);
     createNamespaceName = new FixedNameNameCreator("iBoxDB.ByteCodes");
     // new NameCreator("ns");
     globalTypeNameCreator   = new GlobalTypeNameCreator(existingNames);
     internalTypeNameCreator = new TypeNameCreator(existingNames);
 }
Example #6
0
 public void Merge(ExistingNames other)
 {
     if (this == other)
     {
         return;
     }
     foreach (var key in other.allNames.Keys)
     {
         allNames[key] = true;
     }
 }
		public void Merge(ExistingNames other) {
			foreach (var key in other.allNames.Keys)
				allNames[key] = true;
		}
Example #8
0
		public void Merge(ExistingNames other) {
			if (this == other)
				return;
			foreach (var key in other.allNames.Keys)
				allNames[key] = true;
		}
 public GlobalTypeNameCreator(ExistingNames existingNames)
     : base(existingNames)
 {
 }
		public GlobalTypeNameCreator(ExistingNames existingNames)
			: base(existingNames) {
		}
		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",
				"Stream",
			};
			foreach (var name in names)
				nameInfos.Add(name, CreateNameCreator(name));
		}