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


C# MergeOption类代码示例

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


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


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