protected ConcreteNavigationProperty(OdcmProperty odcmProperty) : base(odcmProperty) { FieldName = NamesService.GetPropertyFieldName(odcmProperty); FieldType = NamesService.GetConcreteTypeName(odcmProperty.Type); Type = new Type(NamesService.GetConcreteInterfaceName(odcmProperty.Type)); PrivateSet = true; }
public static Attribute ForLowerCaseProperty() { return(new Attribute { Type = new Type(NamesService.GetExtensionTypeName("LowerCasePropertyAttribute")) }); }
public static FetcherExpandMethod ForFetcherClass(OdcmClass odcmClass, OdcmProjection projection) { return(new FetcherExpandMethod(odcmClass, projection) { DefiningInterface = NamesService.GetFetcherInterfaceName(odcmClass, projection) }); }
public static CollectionGetByIdIndexer ForCollectionClass(OdcmEntityClass odcmClass, OdcmProjection projection) { return(new CollectionGetByIdIndexer(odcmClass, projection) { DefiningInterface = NamesService.GetCollectionInterfaceName(odcmClass, projection) }); }
protected ConcreteNavigationAccessorProperty(OdcmProperty odcmProperty) : base(odcmProperty) { FieldName = NamesService.GetPropertyFieldName(odcmProperty); InstanceType = NamesService.GetFetcherTypeName(odcmProperty.Type); FieldType = NamesService.GetConcreteTypeName(odcmProperty.Type); Type = new Type(NamesService.GetConcreteTypeName(odcmProperty.Type)); }
public static CollectionGetByIdMethod ForCollectionClass(OdcmClass odcmClass, OdcmProjection projection = null) { return(new CollectionGetByIdMethod(odcmClass, projection) { DefiningInterface = NamesService.GetCollectionInterfaceName(odcmClass, projection) }); }
public static FetcherNavigationProperty ForConcrete(OdcmProperty odcmProperty) { return(new FetcherNavigationProperty(odcmProperty) { DefiningInterface = NamesService.GetFetcherInterfaceName(odcmProperty.Class) }); }
protected FetcherNavigationProperty(OdcmProperty odcmProperty) : base(odcmProperty) { FieldName = NamesService.GetFetcherFieldName(odcmProperty); InstanceType = NamesService.GetFetcherTypeName(odcmProperty.Projection.Type); PrivateSet = true; Type = new Type(NamesService.GetFetcherInterfaceName(odcmProperty.Projection.Type, odcmProperty.Projection)); }
public new static ConcreteNavigationProperty ForConcrete(OdcmProperty odcmProperty) { return(new ConcreteNavigationCollectionProperty(odcmProperty) { DefiningInterface = NamesService.GetConcreteInterfaceName(odcmProperty.Class), }); }
private void Write(ConcreteUpcastMethod method) { WriteSignature(method); using (_builder.IndentBraced) { _("return ({0}) this;", NamesService.GetFetcherInterfaceName(method.DerivedType)); } }
public CollectionGetByIdMethod(OdcmClass odcmClass, OdcmProjection projection = null) { Name = "GetById"; ParameterToPropertyMap = ((OdcmEntityClass)odcmClass).Key.ToDictionary(Parameter.FromProperty, p => p); Parameters = global::Vipr.Writer.CSharp.Lite.Parameters.GetKeyParameters(odcmClass); ReturnType = new Type(NamesService.GetFetcherInterfaceName(odcmClass, projection)); OdcmClass = odcmClass; }
public static Parameter FromProperty(OdcmProperty arg) { return(new Parameter { Name = arg.Name.ToLowerCamelCase(), Type = new Type(NamesService.GetConcreteTypeName(arg.Type)) }); }
public ObsoletedNavigationProperty(OdcmProperty odcmProperty) : base(odcmProperty) { Type = odcmProperty.IsCollection ? new Type(new Identifier("global::System.Collections.Generic", "IList"), new Type(NamesService.GetConcreteTypeName(odcmProperty.Type))) : new Type(NamesService.GetConcreteTypeName(odcmProperty.Type)); IsCollection = odcmProperty.IsCollection; }
public EnsureQueryMethod(OdcmClass odcmClass) { Visibility = Visibility.Private; Name = "EnsureQuery"; FetchedType = new Type(NamesService.GetConcreteTypeName(odcmClass)); FetchedTypeInterface = new Type(NamesService.GetConcreteInterfaceName(odcmClass)); ReturnType = new Type(NamesService.GetExtensionTypeName("IReadOnlyQueryableSet"), new Type(NamesService.GetConcreteInterfaceName(odcmClass))); }
private ConcreteNavigationCollectionProperty(OdcmProperty odcmProperty) : base(odcmProperty) { FieldName = NamesService.GetConcreteFieldName(odcmProperty); OdcmType = odcmProperty.Type; PrivateSet = true; Type = new Type(new Identifier("global::System.Collections.Generic", "IList"), new Type(NamesService.GetConcreteInterfaceName(odcmProperty.Type))); }
public static Interface ForFetcherUpcastMethods(OdcmEntityClass odcmClass) { return(new Interface { Identifier = NamesService.GetFetcherInterfaceName(odcmClass), Methods = global::Vipr.Writer.CSharp.Lite.Methods.ForFetcherInterfaceUpcasts(odcmClass), }); }
protected FetcherNavigationCollectionProperty(OdcmProperty odcmProperty) : base(odcmProperty) { CollectionType = new Type(NamesService.GetCollectionTypeName((OdcmClass)odcmProperty.Projection.Type)); FieldName = NamesService.GetFetcherCollectionFieldName(odcmProperty); InstanceType = NamesService.GetConcreteTypeName(odcmProperty.Projection.Type); Type = new Type(NamesService.GetCollectionInterfaceName((OdcmClass)odcmProperty.Projection.Type, odcmProperty.Projection)); }
public static Field ForNavigationProperty(OdcmProperty property) { return(new Field { Name = NamesService.GetPropertyFieldName(property), Type = new Type(NamesService.GetConcreteTypeName(property.Type)) }); }
public static Interface ForCountableCollection(OdcmClass odcmClass) { return(new Interface { Identifier = NamesService.GetCollectionInterfaceName(odcmClass), Methods = global::Vipr.Writer.CSharp.Lite.Methods.ForCountableCollectionInterface(odcmClass) }); }
public static Field ForFetcherNavigationCollectionProperty(OdcmProperty property) { return(new Field { Name = NamesService.GetFetcherCollectionFieldName(property), Type = new Type(NamesService.GetCollectionTypeName((OdcmClass)property.Type)) }); }
public CollectionExecuteAsyncMethod(OdcmClass odcmClass) { Name = "ExecuteAsync"; Parameters = Parameter.Empty; ReturnType = new Type(new Identifier("global::System.Threading.Tasks", "Task"), new Type(NamesService.GetExtensionTypeName("IPagedCollection"), new Type(NamesService.GetConcreteInterfaceName(odcmClass)))); }
public ObsoletedProperty(OdcmProperty odcmProperty) : base(odcmProperty) { Type = odcmProperty.IsCollection ? new Type(new Identifier("global::System.Collections.Generic", "IList"), TypeService.GetPropertyType(odcmProperty)) : TypeService.GetPropertyType(odcmProperty); UpdatedName = Name; Name = NamesService.GetModelPropertyName(odcmProperty); }
public ContainerTypeFromNameMethod(OdcmClass odcmContainer) { ClientNamespace = NamesService.GetNamespaceName(odcmContainer.Namespace); Visibility = Visibility.Private; Name = "ResolveTypeFromName"; Parameters = new[] { new Parameter(new Type(new Identifier("System", "String")), "typeName"), }; ReturnType = new Type(new Identifier("global::System", "Type")); ServerNamespace = odcmContainer.Namespace.Name; }
public static Field ForConcreteNavigationCollectionProperty(OdcmProperty property) { return(new Field { Name = NamesService.GetConcreteFieldName(property), Type = new Type(new Identifier("global::System.Collections.Generic", "List"), new Type(NamesService.GetConcreteTypeName(property.Type))) }); }
public FetcherExecuteAsyncMethod(OdcmClass odcmClass) { IsAsync = true; IsOverriding = odcmClass.Base is OdcmClass && !((OdcmClass)odcmClass.Base).IsAbstract; Name = "ExecuteAsync"; Parameters = Parameter.Empty; ReturnType = new Type(new Identifier("global::System.Threading.Tasks", "Task"), new Type(NamesService.GetConcreteInterfaceName(odcmClass))); }
public ConcreteExecuteAsyncMethod(OdcmType odcmType) { EntityIdentifier = NamesService.GetConcreteInterfaceName(odcmType); DefiningInterface = NamesService.GetFetcherInterfaceName(odcmType); Name = "ExecuteAsync"; Parameters = Parameter.Empty; ReturnType = new Type(new Identifier("global::System.Threading.Tasks", "Task"), new Type(NamesService.GetConcreteInterfaceName(odcmType))); }
private ConcreteNavigationCollectionAccessorProperty(OdcmProperty odcmProperty) : base(odcmProperty) { CollectionType = new Type(NamesService.GetCollectionTypeName((OdcmClass)odcmProperty.Type)); FieldName = NamesService.GetConcreteFieldName(odcmProperty); InstanceType = NamesService.GetConcreteTypeName(odcmProperty.Type); Type = new Type(new Identifier("global::System.Collections.Generic", "IList"), new Type(NamesService.GetConcreteTypeName(odcmProperty.Type))); PrivateSet = true; }
public static Class ForCountableCollection(OdcmClass odcmClass) { return(new Class { AccessModifier = "internal ", Identifier = NamesService.GetCollectionTypeName(odcmClass), Methods = global::Vipr.Writer.CSharp.Lite.Methods.ForCountableCollectionInterface(odcmClass) }); }
public static Class ForFetcherUpcastMethods(OdcmEntityClass odcmClass) { return(new Class { AccessModifier = "internal ", Identifier = NamesService.GetFetcherTypeName(odcmClass), Methods = global::Vipr.Writer.CSharp.Lite.Methods.ForFetcherUpcasts(odcmClass), }); }
public static IEnumerable <Property> ForEntityContainer(OdcmClass odcmContainer) { return(Properties.ForEntityContainerInterface(odcmContainer) .Concat(new Property[] { new AutoProperty("Context", new Type(NamesService.GetExtensionTypeName("DataServiceContextWrapper")), privateSet: true) })); }