当前位置: 首页>>代码示例>>C#>>正文


C# IContainerOwner类代码示例

本文整理汇总了C#中IContainerOwner的典型用法代码示例。如果您正苦于以下问题:C# IContainerOwner类的具体用法?C# IContainerOwner怎么用?C# IContainerOwner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IContainerOwner类属于命名空间,在下文中一共展示了IContainerOwner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CallDeleteActivity

 private static bool CallDeleteActivity(string targetObjectID, IContainerOwner owner)
 {
     Activity activity = Activity.RetrieveFromOwnerContent(owner, targetObjectID);
     //Activity.RetrieveFromOwnerContent(owner, )
     DeleteInformationObject.Execute(new DeleteInformationObjectParameters { ObjectToDelete = activity });
     return false;
 }
开发者ID:rodmjay,项目名称:TheBallOnAzure,代码行数:7,代码来源:PerformWebActionImplementation.cs

示例2: EnsureMasterCollections

 public static void EnsureMasterCollections(IContainerOwner owner)
 {
     {
             var masterCollection = ProductUsageCollection.GetMasterCollectionInstance(owner);
             if(masterCollection == null)
             {
                 masterCollection = ProductUsageCollection.CreateDefault();
                 masterCollection.RelativeLocation =
                     ProductUsageCollection.GetMasterCollectionLocation(owner);
                 StorageSupport.StoreInformation(masterCollection, owner);
             }
             IInformationCollection collection = masterCollection;
             collection.SubscribeToContentSource();
         }
         {
             var masterCollection = ProductCollection.GetMasterCollectionInstance(owner);
             if(masterCollection == null)
             {
                 masterCollection = ProductCollection.CreateDefault();
                 masterCollection.RelativeLocation =
                     ProductCollection.GetMasterCollectionLocation(owner);
                 StorageSupport.StoreInformation(masterCollection, owner);
             }
             IInformationCollection collection = masterCollection;
             collection.SubscribeToContentSource();
         }
 }
开发者ID:kallex,项目名称:Caloom,代码行数:27,代码来源:CaloomCore.designer.cs

示例3: GetTarget_ObjectToDelete

 public static IInformationObject GetTarget_ObjectToDelete(IContainerOwner owner, string objectDomainName, string objectName, string objectId)
 {
     IInformationObject objectToDelete =
         StorageSupport.RetrieveInformationObjectFromDefaultLocation(objectDomainName, objectName, objectId,
                                                                     owner);
     return objectToDelete;
 }
开发者ID:kallex,项目名称:Caloom,代码行数:7,代码来源:DeleteSpecifiedInformationObjectImplementation.cs

示例4: ExecuteMethod_InitializeGroupWithDefaultObjects

 public static void ExecuteMethod_InitializeGroupWithDefaultObjects(IContainerOwner groupAsOwner)
 {
     // Initialize nodesummarycontainer
     NodeSummaryContainer nodeSummaryContainer = NodeSummaryContainer.CreateDefault();
     nodeSummaryContainer.SetLocationAsOwnerContent(groupAsOwner, "default");
     nodeSummaryContainer.StoreInformationMasterFirst(groupAsOwner, true);
 }
开发者ID:kallex,项目名称:Caloom,代码行数:7,代码来源:CreateGroupWithTemplatesImplementation.cs

示例5: PutQueryRequestToQueue

 public static void PutQueryRequestToQueue(string storageContainerName, string indexName, IContainerOwner owner, string requestID)
 {
     var queueName = GetQueryRequestQueueName(indexName);
     string ownerstring = owner.ToParseableString();
     string messageText = storageContainerName + ":" +  ownerstring + ":" + requestID;
     QueueSupport.PutMessageToQueue(queueName, messageText);
 }
开发者ID:kallex,项目名称:Caloom,代码行数:7,代码来源:IndexSupport.cs

示例6: ExecuteMethod_PerformIndexing

 public static void ExecuteMethod_PerformIndexing(IContainerOwner owner, IndexingRequest indexingRequest, string luceneIndexFolder)
 {
     string indexName = indexingRequest.IndexName;
     List<Document> documents = new List<Document>();
     List<string> removeDocumentIDs = new List<string>();
     foreach (var objLocation in indexingRequest.ObjectLocations)
     {
         IInformationObject iObj = StorageSupport.RetrieveInformation(objLocation, null, owner);
         if (iObj == null)
         {
             var lastSlashIX = objLocation.LastIndexOf('/');
             var objectID = objLocation.Substring(lastSlashIX + 1);
             removeDocumentIDs.Add(objectID);
             continue;
         }
         IIndexedDocument iDoc = iObj as IIndexedDocument;
         if (iDoc != null)
         {
             var luceneDoc = iDoc.GetLuceneDocument(indexName);
             if (luceneDoc == null)
                 continue;
             luceneDoc.RemoveFields("ObjectDomainName");
             luceneDoc.RemoveFields("ObjectName");
             luceneDoc.RemoveFields("ObjectID");
             luceneDoc.RemoveFields("ID");
             luceneDoc.Add(new Field("ObjectDomainName", iObj.SemanticDomainName, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.NO));
             luceneDoc.Add(new Field("ObjectName", iObj.Name, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.NO));
             luceneDoc.Add(new Field("ObjectID", iObj.ID, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.NO));
             luceneDoc.Add(new Field("ID", iObj.ID, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.NO));
             documents.Add(luceneDoc);
         }
     }
     FieldIndexSupport.AddAndRemoveDocuments(luceneIndexFolder, documents.ToArray(), removeDocumentIDs.ToArray());
 }
开发者ID:kallex,项目名称:Caloom,代码行数:34,代码来源:IndexInformationImplementation.cs

示例7: CallDeleteAddressAndLocation

 private static bool CallDeleteAddressAndLocation(string addressAndLocationID, IContainerOwner owner)
 {
     AddressAndLocation addressAndLocation = AddressAndLocation.RetrieveFromOwnerContent(owner,
                                                                                         addressAndLocationID);
     addressAndLocation.DeleteInformationObject();
     return false;
 }
开发者ID:kallex,项目名称:Caloom,代码行数:7,代码来源:PerformWebActionImplementation.cs

示例8: ExecuteMethod_ExecuteActualOperation

 public static bool ExecuteMethod_ExecuteActualOperation(string targetObjectID, string commandName, IContainerOwner owner, InformationSourceCollection informationSources, string[] formSourceNames, NameValueCollection formSubmitContent)
 {
     switch(commandName)
     {
         case "RemoveCollaborator":
             return CallRemoveGroupMember(targetObjectID, owner);
         case "PublishGroupPublicContent":
             return CallPublishGroupContentToPublicArea(owner);
         case "PublishGroupWwwContent":
             return CallPublishGroupContentToWww(owner);
         case "AssignCollaboratorRole":
             return CallAssignCollaboratorRole(targetObjectID, owner, informationSources.GetDefaultSource(typeof(GroupContainer).FullName) ,formSubmitContent);
         case "DeleteBlog":
             return CallDeleteBlog(targetObjectID, owner);
         case "DeleteActivity":
             return CallDeleteActivity(targetObjectID, owner);
         case "UnlinkEmailAddress":
             return CallUnlinkEmailAddress(targetObjectID, owner,
                                           informationSources.GetDefaultSource(typeof (AccountContainer).FullName));
         case "CreateHelloWorld":
             return CallCreateHelloWorld(owner, helloText: formSubmitContent["tHelloText"]);
         case "DeleteHelloWorld":
             return CallDeleteHelloWorld(owner, helloWorldId: formSubmitContent["HelloWorldID"]);
         default:
             throw new NotImplementedException("Operation mapping for command not implemented: " + commandName);
     }
 }
开发者ID:rodmjay,项目名称:TheBallOnAzure,代码行数:27,代码来源:PerformWebActionImplementation.cs

示例9: ExecuteOwnerWebPOST

        public static object ExecuteOwnerWebPOST(IContainerOwner containerOwner, NameValueCollection form, HttpFileCollection fileContent)
        {
            bool reloadPageAfter = form["NORELOAD"] == null;

            bool isCancelButton = form["btnCancel"] != null;
            if (isCancelButton)
                return reloadPageAfter;

            string operationName = form["ExecuteOperation"];
            if (operationName != null)
            {
                var operationResult = executeOperationWithFormValues(containerOwner, operationName, form, fileContent);
                if(operationResult != null)
                    return operationResult;
                return reloadPageAfter;
            }

            string adminOperationName = form["ExecuteAdminOperation"];
            if (adminOperationName != null)
            {
                var adminResult = executeAdminOperationWithFormValues(containerOwner, adminOperationName, form, fileContent);
                if(adminResult != null)
                    return adminResult;
                return reloadPageAfter;
            }

            string contentSourceInfo = form["ContentSourceInfo"];
            var rootSourceAction = form["RootSourceAction"];
            if (rootSourceAction != null && rootSourceAction != "Save")
                return reloadPageAfter;
            var filterFields = new string[] { "ContentSourceInfo", "RootSourceAction", "NORELOAD" };
            string[] contentSourceInfos = contentSourceInfo.Split(',');
            var filteredForm = filterForm(form, filterFields);
            foreach (string sourceInfo in contentSourceInfos)
            {
                string relativeLocation;
                string oldETag;
                retrieveDataSourceInfo(sourceInfo, out relativeLocation, out oldETag);
                VirtualOwner verifyOwner = VirtualOwner.FigureOwner(relativeLocation);
                if (verifyOwner.IsSameOwner(containerOwner) == false)
                    throw new SecurityException("Mismatch in ownership of data submission");
                IInformationObject rootObject = StorageSupport.RetrieveInformation(relativeLocation, oldETag,
                                                                                   containerOwner);
                if (oldETag != rootObject.ETag)
                {
                    throw new InvalidDataException("Information under editing was modified during display and save");
                }
                // TODO: Proprely validate against only the object under the editing was changed (or its tree below)

                SetObjectTreeValues.Execute(new SetObjectTreeValuesParameters
                    {
                        RootObject = rootObject,
                        HttpFormData = filteredForm,
                        HttpFileData = fileContent
                    });
            }
            return reloadPageAfter;
        }
开发者ID:kallex,项目名称:Caloom,代码行数:58,代码来源:ModifyInformationSupport.cs

示例10: GetTarget_CreatedObject

 public static IInformationObject GetTarget_CreatedObject(IContainerOwner owner, string objectDomainName, string objectName)
 {
     string objectTypeName = objectDomainName + "." + objectName;
     Type objectType = Type.GetType(objectTypeName);
     IInformationObject iObj = (IInformationObject) Activator.CreateInstance(objectType);
     var relativeLocation = StorageSupport.GetOwnerContentLocation(owner, objectDomainName + "/" + objectName + "/" + iObj.ID);
     iObj.RelativeLocation = relativeLocation;
     return iObj;
 }
开发者ID:kallex,项目名称:Caloom,代码行数:9,代码来源:CreateSpecifiedInformationObjectWithValuesImplementation.cs

示例11: GetTarget_AuthenticatedAsActiveDevice

 public static AuthenticatedAsActiveDevice GetTarget_AuthenticatedAsActiveDevice(IContainerOwner owner, string authenticationDeviceDescription, string negotiationUrl, string connectionUrl)
 {
     AuthenticatedAsActiveDevice activeDevice = new AuthenticatedAsActiveDevice();
     activeDevice.SetLocationAsOwnerContent(owner, activeDevice.ID);
     activeDevice.AuthenticationDescription = authenticationDeviceDescription;
     //activeDevice.SharedSecret = sharedSecret;
     activeDevice.NegotiationURL = negotiationUrl;
     activeDevice.ConnectionURL = connectionUrl;
     return activeDevice;
 }
开发者ID:kallex,项目名称:Caloom,代码行数:10,代码来源:CreateAuthenticatedAsActiveDeviceImplementation.cs

示例12: RefreshMasterCollections

 public static void RefreshMasterCollections(IContainerOwner owner)
 {
     {
             IInformationCollection masterCollection = HelloWorldCollection.GetMasterCollectionInstance(owner);
             if (masterCollection == null)
                 throw new InvalidDataException("Master collection HelloWorldCollection missing for owner");
             masterCollection.RefreshContent();
             StorageSupport.StoreInformation((IInformationObject) masterCollection, owner);
         }
 }
开发者ID:rodmjay,项目名称:TheBallOnAzure,代码行数:10,代码来源:TheBallDemo.designer.cs

示例13: GetTarget_CreatedInformationInput

 public static InformationInput GetTarget_CreatedInformationInput(IContainerOwner owner, string inputDescription, string locationUrl, string localContentName, string authenticatedDeviceId)
 {
     InformationInput informationInput = new InformationInput();
     informationInput.SetLocationAsOwnerContent(owner, informationInput.ID);
     informationInput.InputDescription = inputDescription;
     informationInput.LocationURL = locationUrl;
     informationInput.LocalContentName = localContentName;
     informationInput.AuthenticatedDeviceID = authenticatedDeviceId;
     return informationInput;
 }
开发者ID:kallex,项目名称:Caloom,代码行数:10,代码来源:CreateInformationInputImplementation.cs

示例14: ExecuteMethod_RemoveExpiredEntries

 public static void ExecuteMethod_RemoveExpiredEntries(IContainerOwner owner, string[] ensureUpdateOnStatusSummaryOutput)
 {
     foreach (string changeItemID in ensureUpdateOnStatusSummaryOutput)
     {
         string relativeLocationFromOwner = InformationChangeItem.GetRelativeLocationFromID(changeItemID);
         var blob = StorageSupport.GetOwnerBlobReference(owner, relativeLocationFromOwner);
         blob.DeleteWithoutFiringSubscriptions();
         var jsonBlob = StorageSupport.GetOwnerBlobReference(owner, relativeLocationFromOwner + ".json");
         jsonBlob.DeleteWithoutFiringSubscriptions();
     }
 }
开发者ID:kallex,项目名称:Caloom,代码行数:11,代码来源:UpdateStatusSummaryImplementation.cs

示例15: GetTarget_PublishInfo

 public static WebPublishInfo GetTarget_PublishInfo(IContainerOwner owner)
 {
     WebPublishInfo publishInfo = WebPublishInfo.RetrieveFromOwnerContent(owner, "default");
     if (publishInfo == null)
     {
         publishInfo = WebPublishInfo.CreateDefault();
         publishInfo.SetLocationAsOwnerContent(owner, "default");
         publishInfo.StoreInformation();
     }
     return publishInfo;
 }
开发者ID:kallex,项目名称:Caloom,代码行数:11,代码来源:ChooseActivePublicationImplementation.cs


注:本文中的IContainerOwner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。