应用到: Microsoft Dynamics CRM 2015, Microsoft Dynamics CRM Online
Retrieves the configured OrganizationServiceContext instance.
命名空间: Microsoft.Xrm.Client.Configuration
程序集: Microsoft.Xrm.Client (在 Microsoft.Xrm.Client.dll 中)
使用情况
用法
Dim contextName As String
Dim allowDefaultFallback As Boolean
Dim returnValue As OrganizationServiceContext
returnValue = CrmConfigurationManager.CreateContext(contextName, allowDefaultFallback)
语法
声明
Public Shared Function CreateContext ( _
<OptionalAttribute> Optional contextName As String = Nothing, _
<OptionalAttribute> Optional allowDefaultFallback As Boolean = False _
) As OrganizationServiceContext
public static OrganizationServiceContext CreateContext (
[OptionalAttribute] string contextName,
[OptionalAttribute] bool allowDefaultFallback
)
参数
- contextName
Type: 字符串. The context name.
- allowDefaultFallback
Type: 布尔值. Whether to allow fallback to the default.
返回值
Type: OrganizationServiceContext
The configured context.
线程安全性
此类型的所有公共静态(Visual Basic 中的 Shared)成员都是线程安全成员。不保证任何实例成员是线程安全成员。
平台
Development Platforms
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Target Platforms
Windows Server 2008,Windows Server 2012,Windows 7
另请参阅
参考
CrmConfigurationManager 类
CrmConfigurationManager 成员
Microsoft.Xrm.Client.Configuration 命名空间
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.