Example #1
0
 public FluentCommand Expand(ODataExpandOptions expandOptions)
 {
     Details.ExpandAssociations.Add(new KeyValuePair <ODataExpandAssociation, ODataExpandOptions>(
                                        new ODataExpandAssociation("*"),
                                        expandOptions));
     return(this);
 }
Example #2
0
        public FluentCommand Expand(ODataExpandOptions expandOptions)
        {
            if (IsBatchResponse)
            {
                return(this);
            }

            _details.ExpandAssociations.AddRange(new[] { new KeyValuePair <string, ODataExpandOptions>("*", ODataExpandOptions.ByValue()) });
            return(this);
        }
Example #3
0
        public static IBoundClient <T> Include <T>(this IBoundClient <T> client, ODataExpandOptions includeOptions, params string[] associations)
            where T : class
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            return(client.Expand(expandOptions: includeOptions, associations: associations));
        }
Example #4
0
        public static IBoundClient <T> Include <T>(this IBoundClient <T> client, ODataExpandOptions includeOptions, Expression <Func <T, object> > expression)
            where T : class
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            return(client.Expand(expandOptions: includeOptions, expression: expression));
        }
Example #5
0
        public FluentCommand Expand(ODataExpandOptions expandOptions, params string[] associations)
        {
            if (IsBatchResponse)
            {
                return(this);
            }

            _details.ExpandAssociations.AddRange(SplitItems(associations).Select(x => new KeyValuePair <string, ODataExpandOptions>(x, expandOptions)));
            return(this);
        }
Example #6
0
 public FT Expand(ODataExpandOptions expandOptions, Expression <Func <T, object> > expression)
 {
     this.Command.Expand(expandOptions, expression.ExtractExpandAssociations(_session.TypeCache));
     return(this as FT);
 }
Example #7
0
 public FT Expand(ODataExpandOptions expandOptions, params ODataExpression[] associations)
 {
     this.Command.Expand(expandOptions, associations.Select(a => ODataExpandAssociation.From(a.Reference)));
     return(this as FT);
 }
Example #8
0
 public FT Expand(ODataExpandOptions expandOptions, params string[] associations)
 {
     this.Command.Expand(expandOptions, associations.Select(ODataExpandAssociation.From));
     return(this as FT);
 }
Example #9
0
 public FluentCommand Expand(ODataExpandOptions expandOptions, IEnumerable <string> associations)
 {
     Details.ExpandAssociations.AddRange(SplitItems(associations).Select(x => new KeyValuePair <string, ODataExpandOptions>(x, expandOptions)));
     return(this);
 }
        public FluentCommand Expand(ODataExpandOptions expandOptions, params string[] associations)
        {
            if (IsBatchResponse) return this;

            _details.ExpandAssociations.AddRange(SplitItems(associations).Select(x => new KeyValuePair<string, ODataExpandOptions>(x, expandOptions)));
            return this;
        }
Example #11
0
 public FluentCommand Expand(ODataExpandOptions expandOptions, params ODataExpression[] columns)
 {
     return(Expand(expandOptions, columns.Select(x => x.Reference)));
 }
Example #12
0
 public FT Expand(ODataExpandOptions expandOptions, params ODataExpression[] associations)
 {
     this.Command.Expand(expandOptions, associations);
     return(this as FT);
 }
Example #13
0
 public FluentCommand Expand(ODataExpandOptions expandOptions, IEnumerable <ODataExpandAssociation> associations)
 {
     Details.ExpandAssociations.AddRange(associations.Select(x =>
                                                             new KeyValuePair <ODataExpandAssociation, ODataExpandOptions>(x, expandOptions)));
     return(this);
 }
Example #14
0
 public FluentCommand Expand(params string[] associations)
 {
     Details.ExpandAssociations.AddRange(SplitItems(associations).Select(x => new KeyValuePair <string, ODataExpandOptions>(x, ODataExpandOptions.ByValue())));
     return(this);
 }
Example #15
0
        public FluentCommand Expand(IEnumerable <string> associations)
        {
            if (IsBatchResponse)
            {
                return(this);
            }

            _details.ExpandAssociations.AddRange(SplitItems(associations).Select(x => new KeyValuePair <string, ODataExpandOptions>(x, ODataExpandOptions.ByValue())));
            return(this);
        }
Example #16
0
 public FT Expand(ODataExpandOptions expandOptions, Expression <Func <T, object> > expression)
 {
     this.Command.Expand(expandOptions, expression.ExtractColumnNames(Command.TypeCache));
     return(this as FT);
 }
Example #17
0
 public FT Expand(ODataExpandOptions expandOptions)
 {
     this.Command.Expand(expandOptions);
     return(this as FT);
 }
        public FluentCommand Expand(ODataExpandOptions expandOptions)
        {
            if (IsBatchResponse) return this;

            _details.ExpandAssociations.AddRange(new[] { new KeyValuePair<string, ODataExpandOptions>("*", ODataExpandOptions.ByValue()) });
            return this;
        }
Example #19
0
 public FT Expand(ODataExpandOptions expandOptions, IEnumerable <string> associations)
 {
     this.Command.Expand(expandOptions, associations.Select(ODataExpandAssociation.From));
     return(this as FT);
 }
 public FluentCommand Expand(ODataExpandOptions expandOptions, params ODataExpression[] columns)
 {
     return Expand(expandOptions, columns.Select(x => x.Reference));
 }
 protected static IEnumerable <KeyValuePair <string, ODataExpandOptions> > FlatExpandAssociations(
     IEnumerable <KeyValuePair <ODataExpandAssociation, ODataExpandOptions> > associations)
 {
     return(associations
            .SelectMany(a => a.Key.ExpandAssociations.Any()
             ? FlatExpandAssociations(a.Key.ExpandAssociations.Select(x =>
                                                                      new KeyValuePair <ODataExpandAssociation, ODataExpandOptions>(x,
                                                                                                                                    ODataExpandOptions.ByValue())))
                        .Select(x => new KeyValuePair <string, ODataExpandOptions>(a.Key.Name + "/" + x.Key, x.Value))
             : new[] { new KeyValuePair <string, ODataExpandOptions>(a.Key.Name, a.Value) })
            .ToList());
 }