• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# MergeOption类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AtomMaterializerLog

 internal AtomMaterializerLog(ResponseInfo responseInfo)
 {
     this.responseInfo = responseInfo;
     this.mergeOption = responseInfo.MergeOption;
     this.identityStack = new Dictionary<string, ODataEntry>(EqualityComparer<string>.Default);
     this.links = new List<LinkDescriptor>();
 }
开发者ID:nickchal,项目名称:pash,代码行数:7,代码来源:AtomMaterializerLog.cs


示例2: Calls_collection_override_passing_in_null

            private void Calls_collection_override_passing_in_null(MergeOption mergeOption)
            {
                var entityCollectionMock = MockHelper.CreateMockEntityCollection<object>(null);

                int timesLoadCalled = 0;
                entityCollectionMock.Setup(m => m.Load(It.IsAny<List<IEntityWrapper>>(), It.IsAny<MergeOption>()))
                    .Callback((IEnumerable<object> actualCollection, MergeOption actualMergeOption) =>
                    {
                        timesLoadCalled++;
                        Assert.Equal(null, actualCollection);
                        Assert.Equal(mergeOption, actualMergeOption);
                    });

                int timesCheckOwnerNullCalled = 0;
                entityCollectionMock.Setup(m => m.CheckOwnerNull())
                    .Callback(() =>
                    {
                        timesCheckOwnerNullCalled++;
                    });

                entityCollectionMock.Object.Load(mergeOption);

                entityCollectionMock.Verify(m => m.Load(It.IsAny<List<IEntityWrapper>>(), It.IsAny<MergeOption>()));

                Assert.True(1 == timesLoadCalled, "Expected Load to be called once for MergeOption." + mergeOption);
                Assert.True(1 == timesCheckOwnerNullCalled, "Expected CheckOwnerNull to be called once for MergeOption." + mergeOption);
            }
开发者ID:jimmy00784,项目名称:entityframework,代码行数:27,代码来源:EntityCollectionTests.cs


示例3: TryRewrite

        internal static bool TryRewrite(DbQueryCommandTree tree, Span span, MergeOption mergeOption, AliasGenerator aliasGenerator, out DbExpression newQuery, out SpanIndex spanInfo)
        {
            newQuery = null;
            spanInfo = null;

            ObjectSpanRewriter rewriter = null;
            bool requiresRelationshipSpan = Span.RequiresRelationshipSpan(mergeOption);

            // Potentially perform a rewrite for span.
            // Note that the public 'Span' property is NOT used to retrieve the Span instance
            // since this forces creation of a Span object that may not be required.
            if (span != null && span.SpanList.Count > 0)
            {
                rewriter = new ObjectFullSpanRewriter(tree, tree.Query, span, aliasGenerator);
            }
            else if (requiresRelationshipSpan)
            {
                rewriter = new ObjectSpanRewriter(tree, tree.Query, aliasGenerator);
            }

            if (rewriter != null)
            {
                rewriter.RelationshipSpan = requiresRelationshipSpan;
                newQuery = rewriter.RewriteQuery();
                if (newQuery != null)
                {
                    Debug.Assert(rewriter.SpanIndex != null || tree.Query.ResultType.EdmEquals(newQuery.ResultType), "Query was rewritten for Span but no SpanIndex was created?");
                    spanInfo = rewriter.SpanIndex;
                }
            }

            return (spanInfo != null);
        }
开发者ID:uQr,项目名称:referencesource,代码行数:33,代码来源:ObjectSpanRewriter.cs


示例4: CreateXrmServiceContext

        protected XrmServiceContext CreateXrmServiceContext(MergeOption? mergeOption = null)
        {
            //string organizationUri = ConfigurationManager.AppSettings["CRM_OrganisationUri"];

            string organizationUri = "https://existornest2.api.crm4.dynamics.com/XRMServices/2011/Organization.svc";

            IServiceManagement<IOrganizationService> OrganizationServiceManagement = ServiceConfigurationFactory.CreateManagement<IOrganizationService>(new Uri(organizationUri));
            AuthenticationProviderType OrgAuthType = OrganizationServiceManagement.AuthenticationType;
            AuthenticationCredentials authCredentials = GetCredentials(OrgAuthType);
            AuthenticationCredentials tokenCredentials = OrganizationServiceManagement.Authenticate(authCredentials);
            OrganizationServiceProxy organizationProxy = null;
            SecurityTokenResponse responseToken = tokenCredentials.SecurityTokenResponse;

            if (ConfigurationManager.AppSettings["CRM_AuthenticationType"] == "ActiveDirectory")
            {
                using (organizationProxy = new OrganizationServiceProxy(OrganizationServiceManagement, authCredentials.ClientCredentials))
                {
                    organizationProxy.EnableProxyTypes();
                }
            }
            else
            {
                using (organizationProxy = new OrganizationServiceProxy(OrganizationServiceManagement, responseToken))
                {
                    organizationProxy.EnableProxyTypes();
                }
            }

            IOrganizationService service = (IOrganizationService)organizationProxy;

            var context = new XrmServiceContext(service);
            if (context != null && mergeOption != null) context.MergeOption = mergeOption.Value;
            return context;
        }
开发者ID:existornest,项目名称:crmCRUD,代码行数:34,代码来源:ConnectionContext.cs


示例5: GetExecutionPlan

 /// <summary>
 /// Retrieves the execution plan for the specified merge option and UseCSharpNullComparisonBehavior flag. May return null if the 
 /// plan for the given merge option and useCSharpNullComparisonBehavior flag is not present.
 /// </summary>
 /// <param name="mergeOption">The merge option for which an execution plan is required.</param>
 /// <param name="useCSharpNullComparisonBehavior">Flag indicating if C# behavior should be used for null comparisons.</param>
 /// <returns>The corresponding execution plan, if it exists; otherwise <c>null</c>.</returns>
 internal ObjectQueryExecutionPlan GetExecutionPlan(MergeOption mergeOption, bool useCSharpNullComparisonBehavior)
 {
     string key = GenerateLocalCacheKey(mergeOption, useCSharpNullComparisonBehavior);
     ObjectQueryExecutionPlan plan;
     _plans.TryGetValue(key, out plan);
     return plan;
 }
开发者ID:uQr,项目名称:referencesource,代码行数:14,代码来源:CompiledQueryCacheEntry.cs


示例6: spVendorInvoices

     public virtual ObjectResult<Invoice> spVendorInvoices(Nullable<int> vendorID, MergeOption mergeOption)
     {
         var vendorIDParameter = vendorID.HasValue ?
             new ObjectParameter("VendorID", vendorID) :
             new ObjectParameter("VendorID", typeof(int));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Invoice>("spVendorInvoices", mergeOption, vendorIDParameter);
     }
开发者ID:ohnoitsfraa,项目名称:2TIN_dotNetAdvanced,代码行数:8,代码来源:Payables.Context.cs


示例7: ObjectParameter

    public virtual ObjectResult<M_寻呼> M_寻呼_列表(string account, MergeOption mergeOption)
    {
        var accountParameter = account != null ?
            new ObjectParameter("Account", account) :
            new ObjectParameter("Account", typeof(string));

        return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<M_寻呼>("M_寻呼_列表", mergeOption, accountParameter);
    }
开发者ID:Homory-Temp,项目名称:LeYi,代码行数:8,代码来源:MM.Context.cs


示例8: usp_search_locations

     public virtual ObjectResult<Location> usp_search_locations(string search, MergeOption mergeOption)
     {
         var searchParameter = search != null ?
             new ObjectParameter("search", search) :
             new ObjectParameter("search", typeof(string));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Location>("usp_search_locations", mergeOption, searchParameter);
     }
开发者ID:jt222dg,项目名称:ASP.NET-MVC,代码行数:8,代码来源:DataModel.Context.cs


示例9: usp_area_locations

     public virtual ObjectResult<Location> usp_area_locations(Nullable<int> area_id, MergeOption mergeOption)
     {
         var area_idParameter = area_id.HasValue ?
             new ObjectParameter("area_id", area_id) :
             new ObjectParameter("area_id", typeof(int));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Location>("usp_area_locations", mergeOption, area_idParameter);
     }
开发者ID:jt222dg,项目名称:ASP.NET-MVC,代码行数:8,代码来源:DataModel.Context.cs


示例10: GetStudentGrades

        public virtual ObjectResult<StudentGrade> GetStudentGrades(Nullable<int> studentID, MergeOption mergeOption)
        {
            var studentIDParameter = studentID.HasValue ?
                new ObjectParameter("StudentID", studentID) :
                new ObjectParameter("StudentID", typeof(int));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<StudentGrade>("GetStudentGrades", mergeOption, studentIDParameter);
        }
开发者ID:riezebosch,项目名称:adonetb1,代码行数:8,代码来源:SchoolEntities.Context.cs


示例11: GetError_ById

     public virtual ObjectResult<Error> GetError_ById(Nullable<int> id, MergeOption mergeOption)
     {
         var idParameter = id.HasValue ?
             new ObjectParameter("Id", id) :
             new ObjectParameter("Id", typeof(int));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Error>("GetError_ById", mergeOption, idParameter);
     }
开发者ID:CuteITGuy,项目名称:QA.Tools,代码行数:8,代码来源:ErrorTestModel.Context.cs


示例12: quickSearch

        public virtual ObjectResult<letter> quickSearch(string search_terms, MergeOption mergeOption)
        {
            var search_termsParameter = search_terms != null ?
                new ObjectParameter("search_terms", search_terms) :
                new ObjectParameter("search_terms", typeof(string));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<letter>("quickSearch", mergeOption, search_termsParameter);
        }
开发者ID:seth-hayward,项目名称:letters,代码行数:8,代码来源:db_mysql.Context.cs


示例13: usp_SearchUserByName

        public virtual ObjectResult<User> usp_SearchUserByName(string usernamePrefix, MergeOption mergeOption)
        {
            var usernamePrefixParameter = usernamePrefix != null ?
                new ObjectParameter("UsernamePrefix", usernamePrefix) :
                new ObjectParameter("UsernamePrefix", typeof(string));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<User>("usp_SearchUserByName", mergeOption, usernamePrefixParameter);
        }
开发者ID:crypteron,项目名称:crypteron-sample-apps,代码行数:8,代码来源:Model.Context.cs


示例14: usp_GetEventsByGuid

        public virtual ObjectResult<CalendarEvent> usp_GetEventsByGuid(string guid, MergeOption mergeOption)
        {
            var guidParameter = guid != null ?
                new ObjectParameter("Guid", guid) :
                new ObjectParameter("Guid", typeof(string));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<CalendarEvent>("usp_GetEventsByGuid", mergeOption, guidParameter);
        }
开发者ID:affans,项目名称:Calendar-System,代码行数:8,代码来源:EventOrganizer.Context.cs


示例15: OfficesInBuildingStoredProc

     public virtual ObjectResult<OfficeMf> OfficesInBuildingStoredProc(Nullable<System.Guid> buildingId, MergeOption mergeOption)
     {
         var buildingIdParameter = buildingId.HasValue ?
             new ObjectParameter("BuildingId", buildingId) :
             new ObjectParameter("BuildingId", typeof(System.Guid));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<OfficeMf>("OfficesInBuildingStoredProc", mergeOption, buildingIdParameter);
     }
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:8,代码来源:CsAdvancedPatterns.Context.cs


示例16: FunGetCustomer

        public virtual ObjectResult<Customer> FunGetCustomer(Nullable<int> userid, MergeOption mergeOption)
        {
            var useridParameter = userid.HasValue ?
                new ObjectParameter("userid", userid) :
                new ObjectParameter("userid", typeof(int));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Customer>("FunGetCustomer", mergeOption, useridParameter);
        }
开发者ID:karthick-psiog,项目名称:POCProject1,代码行数:8,代码来源:POCDataModel.Context.cs


示例17: GetProduct

     public virtual ObjectResult<Product> GetProduct(Nullable<int> productID, MergeOption mergeOption)
     {
         var productIDParameter = productID.HasValue ?
             new ObjectParameter("ProductID", productID) :
             new ObjectParameter("ProductID", typeof(int));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Product>("GetProduct", mergeOption, productIDParameter);
     }
开发者ID:ah16269,项目名称:rest-web-api-wcf,代码行数:8,代码来源:Northwind.Context.cs


示例18: bq_Part_GetById

        public virtual ObjectResult<bq_Part> bq_Part_GetById(Nullable<byte> partId, MergeOption mergeOption)
        {
            var partIdParameter = partId.HasValue ?
                new ObjectParameter("partId", partId) :
                new ObjectParameter("partId", typeof(byte));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<bq_Part>("bq_Part_GetById", mergeOption, partIdParameter);
        }
开发者ID:tucuong,项目名称:bquiz,代码行数:8,代码来源:Bquiz.Context.cs


示例19: SelectStudentsByCourseNo

     public virtual ObjectResult<Person> SelectStudentsByCourseNo(Nullable<System.Guid> courseID, MergeOption mergeOption)
     {
         var courseIDParameter = courseID.HasValue ?
             new ObjectParameter("CourseID", courseID) :
             new ObjectParameter("CourseID", typeof(System.Guid));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Person>("SelectStudentsByCourseNo", mergeOption, courseIDParameter);
     }
开发者ID:rabbal,项目名称:WPFEducation_Management,代码行数:8,代码来源:Model.Context.cs


示例20: EntityTrackingAdapter

 /// <summary>
 /// Initializes a new instance of the <see cref="EntityTrackingAdapter" /> class.
 /// </summary>
 /// <param name="entityTracker">The entity tracker.</param>
 /// <param name="mergeOption">The merge option.</param>
 /// <param name="model">The model.</param>
 /// <param name="context">The context.</param>
 internal EntityTrackingAdapter(EntityTrackerBase entityTracker, MergeOption mergeOption, ClientEdmModel model, DataServiceContext context)
 {
     this.MaterializationLog = new AtomMaterializerLog(mergeOption, model, entityTracker);
     this.MergeOption = mergeOption;
     this.EntityTracker = entityTracker;
     this.Model = model;
     this.Context = context;
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:15,代码来源:EntityTrackingAdapter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# MersenneTwister类代码示例发布时间:2022-05-24
下一篇:
C# MergableMenu类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap