Esempio n. 1
0
        public static void InitializeService(DataServiceConfiguration config)
        {
            TableDataServiceBase <T> .InitializeCommonServiceConfig(config);

            config.DataServiceBehavior.AcceptProjectionRequests = false;
            config.DataServiceBehavior.MaxProtocolVersion       = DataServiceProtocolVersion.V1;
            config.DataServiceBehavior.AlwaysUseDefaultXmlNamespaceForRootElement = true;
        }
Esempio n. 2
0
        private void DispatchRequestToAstoria(IAccountIdentifier identifier, TableProtocolHead tableProtocolHead, RequestStartedCallback requestStartedCallback, CheckPermissionDelegate checkPermissionCallback, QueryRowCommandPropertiesAvailableCallback queryRowCommandPropertiesAvailableCallback, Dictionary <string, string> continuationToken, ContinuationTokenAvailableCallback continuationTokenAvailableCallback, bool operationIsConditional)
        {
            Logger <IRestProtocolHeadLogger> .Instance.Verbose.Log("Deferring request to Astoria.");

            TableDataServiceBase <IUtilityTableDataContext> tableDataServiceV3 = null;

            if (tableProtocolHead.IsRequestVersionAtLeast("2013-08-15"))
            {
                tableDataServiceV3 = new TableDataServiceV3 <IUtilityTableDataContext>(tableProtocolHead, identifier, this.utilityTableDataContextFactory, operationIsConditional, continuationToken, requestStartedCallback, checkPermissionCallback, queryRowCommandPropertiesAvailableCallback, continuationTokenAvailableCallback);
            }
            else if (!tableProtocolHead.IsRequestVersionAtLeast("2011-08-18"))
            {
                tableDataServiceV3 = new TableDataServiceV1 <IUtilityTableDataContext>(tableProtocolHead, identifier, this.utilityTableDataContextFactory, operationIsConditional, continuationToken, requestStartedCallback, checkPermissionCallback, queryRowCommandPropertiesAvailableCallback, continuationTokenAvailableCallback);
            }
            else
            {
                tableDataServiceV3 = new TableDataServiceV2 <IUtilityTableDataContext>(tableProtocolHead, identifier, this.utilityTableDataContextFactory, operationIsConditional, continuationToken, requestStartedCallback, checkPermissionCallback, queryRowCommandPropertiesAvailableCallback, continuationTokenAvailableCallback);
            }
            tableDataServiceV3.AttachHost(tableProtocolHead);
            tableDataServiceV3.ProcessRequest();
            Logger <IRestProtocolHeadLogger> .Instance.Verbose.Log("Astoria finished processing request.");
        }