public void Push(MetaMetadataField mmField) { Debug.WriteLine("pushing " + mmField); mmStack.Push(mmField); // put mmd scope MultiAncestorScope <Object> scope = new MultiAncestorScope <Object>(); if (scopeStack.Count > 0) { scope.AddAncestor(scopeStack.Peek()); } scopeStack.Push(scope); // put generic type var scope MmdGenericTypeVarScope existingMmdGenericTypeVarScope = (MmdGenericTypeVarScope)scope.Get(GENERIC_TYPE_VAR_SCOPE); MmdGenericTypeVarScope currentMmdGenericTypeVarScope = mmField.GenericTypeVars; if (currentMmdGenericTypeVarScope != null && existingMmdGenericTypeVarScope != null) { currentMmdGenericTypeVarScope.InheritFrom(existingMmdGenericTypeVarScope, this); } scope.AddIfValueNotNull(GENERIC_TYPE_VAR_SCOPE, mmField.GenericTypeVars); }
public void Push(MetaMetadataField mmField) { Debug.WriteLine("pushing " + mmField); mmStack.Push(mmField); // put mmd scope MultiAncestorScope<Object> scope = new MultiAncestorScope<Object>(); if (scopeStack.Count > 0) scope.AddAncestor(scopeStack.Peek()); scopeStack.Push(scope); // put generic type var scope MmdGenericTypeVarScope existingMmdGenericTypeVarScope = (MmdGenericTypeVarScope) scope.Get(GENERIC_TYPE_VAR_SCOPE); MmdGenericTypeVarScope currentMmdGenericTypeVarScope = mmField.GenericTypeVars; if (currentMmdGenericTypeVarScope != null && existingMmdGenericTypeVarScope != null) { currentMmdGenericTypeVarScope.InheritFrom(existingMmdGenericTypeVarScope, this); } scope.AddIfValueNotNull(GENERIC_TYPE_VAR_SCOPE, mmField.GenericTypeVars); }