public static BasePropertyMetadata MapToBase(DBPropertyModel propertyMetadata) { BasePropertyMetadata propertyModel = new BasePropertyMetadata { Name = propertyMetadata.Name, TypeMetadata = DBTypeMapper.EmitReferenceDTG(propertyMetadata.TypeMetadata) }; return(propertyModel); }
public static BaseParameterMetadata MapToBase(DBParameterModel parameterMetadata) { BaseParameterMetadata parameterModel = new BaseParameterMetadata { ParameterName = parameterMetadata.Name, TypeMetadata = DBTypeMapper.EmitReferenceDTG(parameterMetadata.TypeMetadata), }; return(parameterModel); }
public static DBPropertyModel MapToDB(BasePropertyMetadata propertyMetadata) { DBPropertyModel propertyModel = new DBPropertyModel { Name = propertyMetadata.Name, TypeMetadata = DBTypeMapper.EmitReferenceDatabase(propertyMetadata.TypeMetadata) }; return(propertyModel); }
private static BaseTypeMetadata EmitReturnTypeDTG(DBMethodModel method) { DBMethodModel methodInfo = method as DBMethodModel; if (methodInfo == null) { return(null); } return(DBTypeMapper.EmitReferenceDTG(methodInfo.ReturnType)); }
public static DBParameterModel MapToDB(BaseParameterMetadata parameterMetadata) { DBParameterModel parameterModel = new DBParameterModel { Name = parameterMetadata.ParameterName, TypeMetadata = DBTypeMapper.EmitReferenceDatabase(parameterMetadata.TypeMetadata), }; return(parameterModel); }
private static DBTypeModel EmitReturnTypeDatabase(BaseMethodMetadata method) { BaseMethodMetadata methodInfo = method as BaseMethodMetadata; if (methodInfo == null) { return(null); } return(DBTypeMapper.EmitReferenceDatabase(methodInfo.ReturnType)); }
public static BaseMethodMetadata MapToBase(DBMethodModel methodMetadata) { BaseMethodMetadata methodModel = new BaseMethodMetadata { MethodName = methodMetadata.Name, GenericArguments = DBTypeMapper.EmitGenericArgumentsDTG(methodMetadata.GenericArgumentsL), ReturnType = EmitReturnTypeDTG(methodMetadata), Parameters = EmitParametersDTG(methodMetadata.ParametersL), }; return(methodModel); }
public static DBMethodModel MapToDB(BaseMethodMetadata methodMetadata) { DBMethodModel methodModel = new DBMethodModel { Name = methodMetadata.MethodName, GenericArguments = DBTypeMapper.EmitGenericArgumentsDatabase(methodMetadata.GenericArguments), ReturnType = EmitReturnTypeDatabase(methodMetadata), Parameters = EmitParametersDatabase(methodMetadata.Parameters), }; return(methodModel); }
public static BaseNamespaceMetadata MapToBase(DBNamespaceModel namespaceMetadata) { var m_NamespaceName = namespaceMetadata.NamespaceName; foreach (var type in namespaceMetadata.TypesL) { Dictionares.TypeDictonaryToDTG[type] = DBTypeMapper.MapToBase(type); } var m_Types = from type in namespaceMetadata.TypesL orderby type.TypeName select DBTypeMapper.fillType(Dictionares.TypeDictonaryToDTG[type], type); BaseNamespaceMetadata namespaceModel = new BaseNamespaceMetadata { NamespaceName = m_NamespaceName, Types = m_Types }; return(namespaceModel); }
public static DBNamespaceModel MapToDB(BaseNamespaceMetadata namespaceMetadata) { var m_NamespaceName = namespaceMetadata.NamespaceName; foreach (var type in namespaceMetadata.Types) { Dictionares.TypeDictonaryToDatabase[type] = DBTypeMapper.MapToDB(type); } var m_Types = from type in namespaceMetadata.Types orderby type.TypeName select DBTypeMapper.FillTypeDatabase(Dictionares.TypeDictonaryToDatabase[type], type); foreach (var t in m_Types) { t.NamespaceName = m_NamespaceName; } DBNamespaceModel namespaceModel = new DBNamespaceModel { NamespaceName = m_NamespaceName, Types = m_Types }; return(namespaceModel); }