コード例 #1
0
 public static void InitializeService(DataServiceConfiguration config)
 {
     config.UseVerboseErrors = true;
     config.DataServiceBehavior.AcceptSpatialLiteralsInQuery = false;
     config.DataServiceBehavior.MaxProtocolVersion           = Microsoft.OData.Client.ODataProtocolVersion.V4;
     config.SetEntitySetAccessRule("*", Microsoft.OData.Service.EntitySetRights.All);
     config.SetServiceActionAccessRule("*", Microsoft.OData.Service.ServiceActionRights.Invoke);
     config.SetServiceOperationAccessRule("*", Microsoft.OData.Service.ServiceOperationRights.All);
     SpatialImplementation.CurrentImplementation.Operations = new Microsoft.Test.OData.Framework.TestProviders.Common.PseudoDistanceImplementation();
     config.EnableTypeAccess("*");
 }
コード例 #2
0
 public static void InitializeService(DataServiceConfiguration config)
 {
     config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
     config.EnableTypeAccess("*");
     config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
     config.UseVerboseErrors = true;
     config.SetServiceOperationAccessRule("*", ServiceOperationRights.AllRead);
     config.MaxResultsPerCollection = 1000;
     config.MaxExpandDepth          = 10;
     config.MaxExpandCount          = 50;
     //config.DataServiceBehavior.AcceptProjectionRequests = true;
 }
コード例 #3
0
        public static void InitializeService(DataServiceConfiguration config)
        {
            config.UseVerboseErrors = true;
            config.DataServiceBehavior.AcceptSpatialLiteralsInQuery = false;
            config.DataServiceBehavior.MaxProtocolVersion           = Microsoft.OData.Client.ODataProtocolVersion.V4;
            config.SetEntitySetAccessRule("*", Microsoft.OData.Service.EntitySetRights.All);
            config.SetServiceActionAccessRule("*", Microsoft.OData.Service.ServiceActionRights.Invoke);
            config.SetServiceOperationAccessRule("*", Microsoft.OData.Service.ServiceOperationRights.All);

            config.SetEntitySetPageSize("Customer", 2);
            config.SetEntitySetPageSize("Order", 2);

            config.RegisterKnownType(typeof(ComplexWithAllPrimitiveTypes));
            config.EnableTypeAccess("*");
        }
コード例 #4
0
        public static void InitializeService(DataServiceConfiguration config)
        {
            config.UseVerboseErrors = true;
            config.DataServiceBehavior.AcceptSpatialLiteralsInQuery = false;
            config.DataServiceBehavior.MaxProtocolVersion           = System.Data.Services.Common.DataServiceProtocolVersion.V3;
            config.SetEntitySetAccessRule("*", System.Data.Services.EntitySetRights.All);
            config.SetEntitySetAccessRule("MappedEntityType", EntitySetRights.None);
            config.SetEntitySetAccessRule("Message", EntitySetRights.AllRead);

            config.SetServiceActionAccessRule("*", System.Data.Services.ServiceActionRights.Invoke);
            config.SetServiceOperationAccessRule("*", System.Data.Services.ServiceOperationRights.All);

            config.SetEntitySetPageSize("Customer", 2);
            config.SetEntitySetPageSize("Order", 2);

            config.RegisterKnownType(typeof(ComplexWithAllPrimitiveTypes));
            config.EnableTypeAccess("*");
        }