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


C# Microsoft.AddReferenceToCollection方法代码示例

本文整理汇总了C#中Microsoft.AddReferenceToCollection方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.AddReferenceToCollection方法的具体用法?C# Microsoft.AddReferenceToCollection怎么用?C# Microsoft.AddReferenceToCollection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft的用法示例。


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

示例1: PopulateIndex_Rows

 private static void PopulateIndex_Rows(Microsoft.OData.Service.IUpdatable updatable, System.Collections.Generic.Dictionary<string, object> resourceLookup) {
     updatable.AddReferenceToCollection(resourceLookup["RowIndex1"], "Rows", resourceLookup["Row0"]);
     updatable.AddReferenceToCollection(resourceLookup["RowIndex3"], "Rows", resourceLookup["Row1"]);
     updatable.AddReferenceToCollection(resourceLookup["RowIndex3"], "Rows", resourceLookup["Row3"]);
     updatable.AddReferenceToCollection(resourceLookup["RowIndex4"], "Rows", resourceLookup["Row9"]);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:6,代码来源:DefaultContainer.cs

示例2: PopulatePerson_PersonMetadata

 private static void PopulatePerson_PersonMetadata(Microsoft.OData.Service.IUpdatable updatable, System.Collections.Generic.Dictionary<string, object> resourceLookup)
 {
     updatable.AddReferenceToCollection(resourceLookup["Person0"], "PersonMetadata", resourceLookup["PersonMetadata0"]);
     updatable.SetReference(resourceLookup["PersonMetadata0"], "Person", resourceLookup["Person0"]);
     updatable.AddReferenceToCollection(resourceLookup["Person0"], "PersonMetadata", resourceLookup["PersonMetadata1"]);
     updatable.SetReference(resourceLookup["PersonMetadata1"], "Person", resourceLookup["Person0"]);
     updatable.AddReferenceToCollection(resourceLookup["Person0"], "PersonMetadata", resourceLookup["PersonMetadata3"]);
     updatable.SetReference(resourceLookup["PersonMetadata3"], "Person", resourceLookup["Person0"]);
     updatable.AddReferenceToCollection(resourceLookup["Person1"], "PersonMetadata", resourceLookup["PersonMetadata4"]);
     updatable.SetReference(resourceLookup["PersonMetadata4"], "Person", resourceLookup["Person1"]);
     updatable.AddReferenceToCollection(resourceLookup["Person3"], "PersonMetadata", resourceLookup["PersonMetadata5"]);
     updatable.SetReference(resourceLookup["PersonMetadata5"], "Person", resourceLookup["Person3"]);
     updatable.AddReferenceToCollection(resourceLookup["Person3"], "PersonMetadata", resourceLookup["PersonMetadata6"]);
     updatable.SetReference(resourceLookup["PersonMetadata6"], "Person", resourceLookup["Person3"]);
     updatable.AddReferenceToCollection(resourceLookup["Person5"], "PersonMetadata", resourceLookup["PersonMetadata7"]);
     updatable.SetReference(resourceLookup["PersonMetadata7"], "Person", resourceLookup["Person5"]);
     updatable.AddReferenceToCollection(resourceLookup["Person6"], "PersonMetadata", resourceLookup["PersonMetadata8"]);
     updatable.SetReference(resourceLookup["PersonMetadata8"], "Person", resourceLookup["Person6"]);
     updatable.AddReferenceToCollection(resourceLookup["Person6"], "PersonMetadata", resourceLookup["PersonMetadata9"]);
     updatable.SetReference(resourceLookup["PersonMetadata9"], "Person", resourceLookup["Person6"]);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:21,代码来源:DefaultContainer.cs

示例3: PopulateLogin_SentMessages

 private static void PopulateLogin_SentMessages(Microsoft.OData.Service.IUpdatable updatable, System.Collections.Generic.Dictionary<string, object> resourceLookup)
 {
     updatable.AddReferenceToCollection(resourceLookup["Login0"], "SentMessages", resourceLookup["Message0"]);
     updatable.SetReference(resourceLookup["Message0"], "Sender", resourceLookup["Login0"]);
     updatable.AddReferenceToCollection(resourceLookup["Login1"], "SentMessages", resourceLookup["Message1"]);
     updatable.SetReference(resourceLookup["Message1"], "Sender", resourceLookup["Login1"]);
     updatable.AddReferenceToCollection(resourceLookup["Login3"], "SentMessages", resourceLookup["Message3"]);
     updatable.SetReference(resourceLookup["Message3"], "Sender", resourceLookup["Login3"]);
     updatable.AddReferenceToCollection(resourceLookup["Login3"], "SentMessages", resourceLookup["Message4"]);
     updatable.SetReference(resourceLookup["Message4"], "Sender", resourceLookup["Login3"]);
     updatable.AddReferenceToCollection(resourceLookup["Login3"], "SentMessages", resourceLookup["Message5"]);
     updatable.SetReference(resourceLookup["Message5"], "Sender", resourceLookup["Login3"]);
     updatable.AddReferenceToCollection(resourceLookup["Login5"], "SentMessages", resourceLookup["Message6"]);
     updatable.SetReference(resourceLookup["Message6"], "Sender", resourceLookup["Login5"]);
     updatable.AddReferenceToCollection(resourceLookup["Login0"], "SentMessages", resourceLookup["Message7"]);
     updatable.SetReference(resourceLookup["Message7"], "Sender", resourceLookup["Login0"]);
     updatable.AddReferenceToCollection(resourceLookup["Login5"], "SentMessages", resourceLookup["Message8"]);
     updatable.SetReference(resourceLookup["Message8"], "Sender", resourceLookup["Login5"]);
     updatable.AddReferenceToCollection(resourceLookup["Login8"], "SentMessages", resourceLookup["Message9"]);
     updatable.SetReference(resourceLookup["Message9"], "Sender", resourceLookup["Login8"]);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:21,代码来源:DefaultContainer.cs

示例4: PopulateProduct_ProductPhoto

 private static void PopulateProduct_ProductPhoto(Microsoft.OData.Service.IUpdatable updatable, System.Collections.Generic.Dictionary<string, object> resourceLookup)
 {
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "Photos", resourceLookup["ProductPhoto0"]);
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "Photos", resourceLookup["ProductPhoto1"]);
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "Photos", resourceLookup["ProductPhoto3"]);
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "Photos", resourceLookup["ProductPhoto4"]);
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "Photos", resourceLookup["ProductPhoto5"]);
     updatable.AddReferenceToCollection(resourceLookup["Product1"], "Photos", resourceLookup["ProductPhoto6"]);
     updatable.AddReferenceToCollection(resourceLookup["Product3"], "Photos", resourceLookup["ProductPhoto7"]);
     updatable.AddReferenceToCollection(resourceLookup["Product3"], "Photos", resourceLookup["ProductPhoto8"]);
     updatable.AddReferenceToCollection(resourceLookup["Product6"], "Photos", resourceLookup["ProductPhoto9"]);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:12,代码来源:DefaultContainer.cs

示例5: PopulateProduct_ProductReview

 private static void PopulateProduct_ProductReview(Microsoft.OData.Service.IUpdatable updatable, System.Collections.Generic.Dictionary<string, object> resourceLookup)
 {
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "Reviews", resourceLookup["ProductReview0"]);
     updatable.SetReference(resourceLookup["ProductReview0"], "Product", resourceLookup["Product0"]);
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "Reviews", resourceLookup["ProductReview1"]);
     updatable.SetReference(resourceLookup["ProductReview1"], "Product", resourceLookup["Product0"]);
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "Reviews", resourceLookup["ProductReview3"]);
     updatable.SetReference(resourceLookup["ProductReview3"], "Product", resourceLookup["Product0"]);
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "Reviews", resourceLookup["ProductReview4"]);
     updatable.SetReference(resourceLookup["ProductReview4"], "Product", resourceLookup["Product0"]);
     updatable.AddReferenceToCollection(resourceLookup["Product1"], "Reviews", resourceLookup["ProductReview5"]);
     updatable.SetReference(resourceLookup["ProductReview5"], "Product", resourceLookup["Product1"]);
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "Reviews", resourceLookup["ProductReview6"]);
     updatable.SetReference(resourceLookup["ProductReview6"], "Product", resourceLookup["Product0"]);
     updatable.AddReferenceToCollection(resourceLookup["Product3"], "Reviews", resourceLookup["ProductReview7"]);
     updatable.SetReference(resourceLookup["ProductReview7"], "Product", resourceLookup["Product3"]);
     updatable.AddReferenceToCollection(resourceLookup["Product3"], "Reviews", resourceLookup["ProductReview8"]);
     updatable.SetReference(resourceLookup["ProductReview8"], "Product", resourceLookup["Product3"]);
     updatable.AddReferenceToCollection(resourceLookup["Product9"], "Reviews", resourceLookup["ProductReview9"]);
     updatable.SetReference(resourceLookup["ProductReview9"], "Product", resourceLookup["Product9"]);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:21,代码来源:DefaultContainer.cs

示例6: PopulateProducts_RelatedProducts

 private static void PopulateProducts_RelatedProducts(Microsoft.OData.Service.IUpdatable updatable, System.Collections.Generic.Dictionary<string, object> resourceLookup)
 {
     updatable.AddReferenceToCollection(resourceLookup["Product0"], "RelatedProducts", resourceLookup["Product0"]);
     updatable.AddReferenceToCollection(resourceLookup["Product1"], "RelatedProducts", resourceLookup["Product1"]);
     updatable.AddReferenceToCollection(resourceLookup["Product3"], "RelatedProducts", resourceLookup["Product3"]);
     updatable.AddReferenceToCollection(resourceLookup["Product3"], "RelatedProducts", resourceLookup["Product4"]);
     updatable.AddReferenceToCollection(resourceLookup["Product5"], "RelatedProducts", resourceLookup["Product5"]);
     updatable.AddReferenceToCollection(resourceLookup["Product6"], "RelatedProducts", resourceLookup["Product6"]);
     updatable.AddReferenceToCollection(resourceLookup["Product3"], "RelatedProducts", resourceLookup["Product7"]);
     updatable.AddReferenceToCollection(resourceLookup["Product5"], "RelatedProducts", resourceLookup["Product8"]);
     updatable.AddReferenceToCollection(resourceLookup["Product8"], "RelatedProducts", resourceLookup["Product9"]);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:12,代码来源:DefaultContainer.cs

示例7: PopulateCustomer_Logins

 private static void PopulateCustomer_Logins(Microsoft.OData.Service.IUpdatable updatable, System.Collections.Generic.Dictionary<string, object> resourceLookup)
 {
     updatable.AddReferenceToCollection(resourceLookup["Customer0"], "Logins", resourceLookup["Login0"]);
     updatable.SetReference(resourceLookup["Login0"], "Customer", resourceLookup["Customer0"]);
     updatable.AddReferenceToCollection(resourceLookup["Customer1"], "Logins", resourceLookup["Login1"]);
     updatable.SetReference(resourceLookup["Login1"], "Customer", resourceLookup["Customer1"]);
     updatable.AddReferenceToCollection(resourceLookup["Customer0"], "Logins", resourceLookup["Login3"]);
     updatable.SetReference(resourceLookup["Login3"], "Customer", resourceLookup["Customer0"]);
     updatable.AddReferenceToCollection(resourceLookup["Customer3"], "Logins", resourceLookup["Login4"]);
     updatable.SetReference(resourceLookup["Login4"], "Customer", resourceLookup["Customer3"]);
     updatable.AddReferenceToCollection(resourceLookup["Customer3"], "Logins", resourceLookup["Login5"]);
     updatable.SetReference(resourceLookup["Login5"], "Customer", resourceLookup["Customer3"]);
     updatable.AddReferenceToCollection(resourceLookup["Customer3"], "Logins", resourceLookup["Login6"]);
     updatable.SetReference(resourceLookup["Login6"], "Customer", resourceLookup["Customer3"]);
     updatable.AddReferenceToCollection(resourceLookup["Customer5"], "Logins", resourceLookup["Login7"]);
     updatable.SetReference(resourceLookup["Login7"], "Customer", resourceLookup["Customer5"]);
     updatable.AddReferenceToCollection(resourceLookup["Customer4"], "Logins", resourceLookup["Login8"]);
     updatable.SetReference(resourceLookup["Login8"], "Customer", resourceLookup["Customer4"]);
     updatable.AddReferenceToCollection(resourceLookup["Customer7"], "Logins", resourceLookup["Login9"]);
     updatable.SetReference(resourceLookup["Login9"], "Customer", resourceLookup["Customer7"]);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:21,代码来源:DefaultContainer.cs

示例8: PopulateMessage_Attachments

 private static void PopulateMessage_Attachments(Microsoft.OData.Service.IUpdatable updatable, System.Collections.Generic.Dictionary<string, object> resourceLookup)
 {
     updatable.AddReferenceToCollection(resourceLookup["Message0"], "Attachments", resourceLookup["MessageAttachment0"]);
     updatable.AddReferenceToCollection(resourceLookup["Message1"], "Attachments", resourceLookup["MessageAttachment1"]);
     updatable.AddReferenceToCollection(resourceLookup["Message3"], "Attachments", resourceLookup["MessageAttachment3"]);
     updatable.AddReferenceToCollection(resourceLookup["Message3"], "Attachments", resourceLookup["MessageAttachment4"]);
     updatable.AddReferenceToCollection(resourceLookup["Message0"], "Attachments", resourceLookup["MessageAttachment5"]);
     updatable.AddReferenceToCollection(resourceLookup["Message6"], "Attachments", resourceLookup["MessageAttachment6"]);
     updatable.AddReferenceToCollection(resourceLookup["Message0"], "Attachments", resourceLookup["MessageAttachment7"]);
     updatable.AddReferenceToCollection(resourceLookup["Message8"], "Attachments", resourceLookup["MessageAttachment8"]);
     updatable.AddReferenceToCollection(resourceLookup["Message4"], "Attachments", resourceLookup["MessageAttachment9"]);
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:12,代码来源:DefaultContainer.cs


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