public void Delete()
        {
            if (String.IsNullOrEmpty(_requestContext.ResourceKey))
            {
                throw new RequestException("Please use a uuid predicate.");
            }
            // TODO: Check resourceKind for value None???

            Guid   uuid;
            string resourceKindName;
            ICorrelatedResSyncInfoStore correlatedResSyncInfoStore;

            // Convert resourceKey into Guid instance
            uuid             = (Guid)TypeDescriptor.GetConverter(typeof(Guid)).ConvertFrom(_requestContext.ResourceKey);
            resourceKindName = _requestContext.ResourceKind.ToString();

            // retrieve correlations from store
            correlatedResSyncInfoStore = new Sage.Integration.Northwind.Sync.StoreLocator().GetCorrelatedResSyncStore(_requestContext.SdataContext);

            // remove the correlation from store
            correlatedResSyncInfoStore.Delete(resourceKindName, uuid);
        }
示例#2
0
        public void Delete()
        {
            if (String.IsNullOrEmpty(_requestContext.ResourceKey))
                throw new RequestException("Please use a uuid predicate.");
            // TODO: Check resourceKind for value None???

            Guid uuid;
            string resourceKindName;
            ICorrelatedResSyncInfoStore correlatedResSyncInfoStore;

            // Convert resourceKey into Guid instance
            uuid = (Guid)TypeDescriptor.GetConverter(typeof(Guid)).ConvertFrom(_requestContext.ResourceKey);
            resourceKindName = _requestContext.ResourceKind.ToString();

            // retrieve correlations from store
            correlatedResSyncInfoStore = new Sage.Integration.Northwind.Sync.StoreLocator().GetCorrelatedResSyncStore(_requestContext.SdataContext);

            // remove the correlation from store
            correlatedResSyncInfoStore.Delete(resourceKindName, uuid);
        }