Ejemplo n.º 1
0
 public ExtendedQueryProvider(ExtendedResourceMapper extendedResourceMapper)
 {
     if (extendedResourceMapper == null)
     {
         throw new ArgumentNullException(nameof(extendedResourceMapper));
     }
     this.extendedResourceMapper = extendedResourceMapper;
 }
Ejemplo n.º 2
0
 public TransformAdditionalPropertiesToAttributesVisitor(ExtendedResourceMapper mapper)
 {
     if (mapper == null)
     {
         throw new ArgumentNullException(nameof(mapper));
     }
     this.mapper = mapper;
 }
Ejemplo n.º 3
0
 internal ExtendedQueryableRoot(IClientTypeResolver client,
                                IQueryable wrappedSource,
                                ExtendedResourceInfo extendedResourceInfo,
                                ExtendedResourceMapper extendedResourceMapper)
     : base(new ExtendedQueryProvider(extendedResourceMapper), null)
 {
     WrappedSource        = wrappedSource;
     ExtendedResourceInfo = extendedResourceInfo;
 }
Ejemplo n.º 4
0
 internal ExtendedResourceInfo(Type extendedType, Type serverType, PropertyInfo dictProperty, ExtendedResourceMapper mapper)
 {
     ExtendedType = extendedType;
     ServerType   = serverType;
     DictProperty = dictProperty;
     this.mapper  = mapper;
     Type[] dictTypeArgs;
     if (dictProperty != null &&
         dictProperty.PropertyType.TryExtractTypeArguments(typeof(IDictionary <,>), out dictTypeArgs))
     {
         DictValueType = dictTypeArgs[1];
     }
     this.extendedProperties =
         new Lazy <ReadOnlyCollection <ExtendedProperty> >(() => InitializeExtendedProperties().ToList().AsReadOnly());
 }