예제 #1
0
        internal static ABProviderCapabilities GetProviderCapabilities(IABSessionSettings addressBookSessionSettings)
        {
            if (addressBookSessionSettings == null)
            {
                throw new ArgumentNullException("addressBookSessionSettings");
            }
            string providerName = ABFactory.GetProviderName(addressBookSessionSettings);

            ExTraceGlobals.FrameworkTracer.TraceDebug <string>(0L, "Getting provider capabilities for provider '{0}'.", providerName);
            IABProviderFactory providerFactory = ABFactory.GetProviderFactory(providerName);

            return(providerFactory.GetProviderCapabilities(addressBookSessionSettings));
        }
예제 #2
0
        internal static ABSession CreateABSession(IABSessionSettings addressBookSessionSettings)
        {
            if (addressBookSessionSettings == null)
            {
                throw new ArgumentNullException("addressBookSessionSettings");
            }
            string providerName = ABFactory.GetProviderName(addressBookSessionSettings);

            ExTraceGlobals.FrameworkTracer.TraceDebug <string>(0L, "Creating session for provider '{0}'.", providerName);
            ABFactory.ThrowIfDisabled(addressBookSessionSettings);
            IABProviderFactory providerFactory = ABFactory.GetProviderFactory(providerName);

            return(providerFactory.Create(addressBookSessionSettings));
        }