Beispiel #1
0
 public void mergeMethods(VariableNameState other)
 {
     existingMethodNames.merge(other.existingMethodNames);
 }
Beispiel #2
0
 public void mergeProperties(VariableNameState other)
 {
     existingPropertyNames.merge(other.existingPropertyNames);
 }
Beispiel #3
0
 public void mergeEvents(VariableNameState other)
 {
     existingEventNames.merge(other.existingEventNames);
 }
Beispiel #4
0
 public VariableNameState merge(VariableNameState other)
 {
     existingVariableNames.merge(other.existingVariableNames);
     existingMethodNames.merge(other.existingMethodNames);
     existingPropertyNames.merge(other.existingPropertyNames);
     existingEventNames.merge(other.existingEventNames);
     variableNameCreator.merge(other.variableNameCreator);
     propertyNameCreator.merge(other.propertyNameCreator);
     eventNameCreator.merge(other.eventNameCreator);
     genericPropertyNameCreator.merge(other.genericPropertyNameCreator);
     staticMethodNameCreator.merge(other.staticMethodNameCreator);
     instanceMethodNameCreator.merge(other.instanceMethodNameCreator);
     return this;
 }
Beispiel #5
0
 public virtual VariableNameState clone()
 {
     var rv = new VariableNameState();
     cloneInit(rv);
     return rv;
 }
Beispiel #6
0
 protected void cloneInit(VariableNameState variableNameState)
 {
     variableNameState.variableNameCreator = variableNameCreator.clone();
     variableNameState.propertyNameCreator = propertyNameCreator.clone();
     variableNameState.eventNameCreator = eventNameCreator.clone();
     variableNameState.staticMethodNameCreator = staticMethodNameCreator.clone();
     variableNameState.virtualMethodNameCreator = virtualMethodNameCreator.clone();
     variableNameState.instanceMethodNameCreator = instanceMethodNameCreator.clone();
     variableNameState.genericPropertyNameCreator = genericPropertyNameCreator.clone();
     variableNameState.pinvokeNameCreator = new PinvokeNameCreator();
     variableNameState.isValidName = isValidName;
 }
Beispiel #7
0
        void prepareRenameMemberDefinitions()
        {
            Log.v("Renaming member definitions #1");

            var interfaceScopes = createInterfaceScopes();
            foreach (var interfaceScope in interfaceScopes) {
                var state = new MemberRenameState(new InterfaceVariableNameState());
                foreach (var iface in interfaceScope.Interfaces)
                    iface.MemberRenameState = state.cloneVariables();
                foreach (var cls in interfaceScope.Classes) {
                    if (cls.isInterface())
                        continue;
                    cls.InterfaceScopeState = state;
                }
            }
            foreach (var interfaceScope in interfaceScopes) {
                foreach (var iface in interfaceScope.Interfaces)
                    iface.prepareRenameMembers();
            }

            var variableNameState = new VariableNameState();
            foreach (var typeDef in baseTypes) {
                var state = new MemberRenameState(variableNameState.clone());
                typeDef.MemberRenameState = state;
            }

            foreach (var typeDef in allTypes)
                typeDef.prepareRenameMembers();

            renameEntryPoints();
        }