public System.Type GetBoundUnderlyingTypeOrThrow(SemanticTypeMask_I semanticType) { var boundType = GetBoundTypeOrThrow(semanticType, false); if (boundType.UnderlyingType == null) { throw new System.Exception("Expected the underlying type to be filled in with a instance of a runtime type."); } return(boundType.UnderlyingType); }
private static ExecutionTypeParameterDefinition_I CreateGenericParameter(SemanticTypeMask_I genericDeclaringType) { if (genericDeclaringType.IsConverted()) { return(new ConvertedGenericParameterTypeDefinition()); } else { return(new BoundGenericParameterTypeDefinition()); } }
public void Add(SemanticTypeMask_I typeDefinitionEntry, SemanticTypeMask_I dependent) { //if (!typeDefinitionEntry.Dependencies.TryGetValue(dependent.ResolutionName(), out SemanticNodeBaseMask_I node1)) //{ // typeDefinitionEntry.Dependencies.Add(dependent.ResolutionName(), dependent); //} //if (!dependent.Dependencies.TryGetValue(typeDefinitionEntry.ResolutionName(), out SemanticNodeBaseMask_I node2)) //{ // dependent.Dependencies.Add(typeDefinitionEntry.ResolutionName(), typeDefinitionEntry); //} }
public BoundTypeDefinitionMask_I GetBoundTypeOrThrow(SemanticTypeMask_I semanticType, bool allowNulls) { if (semanticType == null) { if (allowNulls) { return(null); } throw new System.Exception("The semantic type is null."); } if (!semanticType.IsBound()) { throw new System.Exception("Expected any type in the conversion graph to be at least a bound type."); } return((BoundTypeDefinitionMask_I)semanticType); }
/// <summary> /// Ensures that all of the types that the method uses have been created so that when the methods is actually converted, /// no types have to be created. /// </summary> /// <param name="conversion"></param> /// <param name="boundTypeMask"></param> public void EnsureTypes(ILConversion conversion, SemanticTypeMask_I boundTypeMask) { if (!boundTypeMask.IsDefinition()) { return; } var typeDefinitionMask = (BoundTypeDefinitionMask_I)boundTypeMask; var typeReference = typeDefinitionMask.SourceTypeReference; // Done on purpose to find errors var typeDefinition = Cecil.GetFundamentalTypeDefinition(typeReference); var methods = typeDefinition.Methods; for (int i = 0; i < methods.Count; i++) { var method = methods[i]; EnsureTypes(conversion, method, typeReference); } }
public void EnsureTypes(ILConversion conversion, SemanticTypeMask_I boundTypeMask) { if (!boundTypeMask.IsDefinition()) { return; } var typeDefinitionMask = (SemanticTypeDefinitionMask_I)boundTypeMask; var typeReference = typeDefinitionMask.SourceTypeReference; var typeDefinition = Cecil.GetFundamentalTypeDefinition(typeReference); var fields = typeDefinition.Fields; for (int i = 0; i < fields.Count; i++) { var field = fields[i]; EnsureTypes(conversion, field, typeReference); } }
public BoundTypeDefinitionMask_I GetBoundTypeOrThrow(SemanticTypeMask_I semanticType, bool allowNulls) { return(Bound.Models.Types.GetBoundTypeOrThrow(semanticType, allowNulls)); }
public System.Type GetBoundUnderlyingTypeOrThrow(SemanticTypeMask_I semanticType) { return(Bound.Models.Types.GetBoundUnderlyingTypeOrThrow(semanticType)); }
public string GetResolutionName(SemanticTypeMask_I input) { var assemblyQualifiedName = input.AssemblyQualifiedName; return(Infrastructure.Structural.Naming.AdjustResolutionName(assemblyQualifiedName)); }
public string GetResolutionName(SemanticTypeMask_I input) { return(Infrastructure.Semantic.Metadata.Members.Types.Naming.GetResolutionName(input)); }
public string GetResolutionName(SemanticTypeMask_I input) { return(Bound.Metadata.Members.Types.Naming.GetResolutionName(input)); }
public List <SemanticTypeMask_I> Calculate(SemanticTypeMask_I convertedModule, List <SemanticTypeMask_I> list) { throw new System.NotImplementedException(); }