示例#1
0
 public FacebookAccountAppService(
     ISocialAccountService socialAccountService,
     IFbClient fbClient
     )
 {
     _socialAccountService = socialAccountService;
     _fbClient             = fbClient;
 }
示例#2
0
        // Method added because we can't inject IFbClient in ctor
        public void SetClient(IFbClient fbClient)
        {
            Contract.Requires(_fbClient == null);             // We shouldn't set this if already set
            Contract.Requires(fbClient != null);
            Contract.Ensures(_fbClient != null);

            _fbClient = fbClient;
        }
示例#3
0
        // Method added because we can't inject IFbClient in ctor
        public void SetClient(IFbClient fbClient)
        {
            Contract.Requires(_fbClient == null);
            Contract.Requires(fbClient != null);
            Contract.Ensures(_fbClient != null);

            _fbClient = fbClient;
        }
示例#4
0
 public WebHookStrategy(IDependencyResolver dependencyResolver)
 {
     ConversationService = dependencyResolver.Resolve <IConversationService>();
     SocialUserService   = dependencyResolver.Resolve <ISocialUserService>();
     MessageService      = dependencyResolver.Resolve <IMessageService>();
     NotificationManager = dependencyResolver.Resolve <INotificationManager>();
     FbClient            = dependencyResolver.Resolve <IFbClient>();
     FacebookConverter   = new FacebookConverter();
 }
示例#5
0
 public FesDatabase(string dllName, Charset charset)
 {
     _fbClient     = FbClientFactory.GetFbClient(dllName);
     _handle       = new DatabaseHandle();
     _charset      = (charset != null ? charset : Charset.DefaultCharset);
     _dialect      = 3;
     _packetSize   = 8192;
     _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH];
 }
 public FesDatabase(string dllName, Charset charset)
 {
     _fbClient     = FbClientFactory.Create(dllName);
     _handle       = new DatabaseHandle();
     Charset       = charset ?? Charset.DefaultCharset;
     Dialect       = 3;
     PacketSize    = 8192;
     _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH];
 }
        public FesDatabase(string dllName, Charset charset)
        {
            this.fbClient     = FbClientFactory.GetFbClient(dllName);
            this.charset      = (charset != null ? charset : Charset.DefaultCharset);
            this.dialect      = 3;
            this.packetSize   = 8192;
            this.statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH];

            GC.SuppressFinalize(this);
        }
 /// <summary>
 /// FacebookAccountsController
 /// </summary>
 /// <param name="uowManager"></param>
 /// <param name="appService"></param>
 /// <param name="fbClient"></param>
 public FacebookAccountsController(
     IUnitOfWorkManager uowManager,
     IFacebookAccountAppService appService,
     IFbClient fbClient
     )
 {
     _uowManager = uowManager;
     _appService = appService;
     _fbClient   = fbClient;
 }
示例#9
0
        public FesDatabase(string dllName, Charset charset)
        {
            this.fbClient = FbClientFactory.GetFbClient(dllName);
            this.charset = (charset != null ? charset : Charset.DefaultCharset);
            this.dialect = 3;
            this.packetSize = 8192;
            this.statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH];

            GC.SuppressFinalize(this);
        }
示例#10
0
 public MessageService(
     ISocialAccountService socialAccountService,
     IConversationService conversationService,
     IFbClient fbClient
     )
 {
     _socialAccountService = socialAccountService;
     _conversationService  = conversationService;
     _fbClient             = fbClient;
 }
示例#11
0
 public SocialAccountService(
     ISiteSocialAccountRepository siteSocialAccountRepo,
     IRepository <SocialUser> socialUserRepo,
     IFbClient fbClient,
     ITwitterAuthService twitterAuthService
     )
 {
     _siteSocialAccountRepo = siteSocialAccountRepo;
     _socialUserRepo        = socialUserRepo;
     _fbClient           = fbClient;
     _twitterAuthService = twitterAuthService;
 }
 private static void ShutdownEntryPointWrapper(IFbClient fbClient)
 {
     // the fb_shutdown does not exists before 2.5
     // the exception is just ignored
     // once <2.5 is not existing we can remove this
     try
     {
         fbClient.fb_shutdown(0, 0);
     }
     catch (EntryPointNotFoundException)
     { }
 }
示例#13
0
 public SocialUserAppService(
     ISocialUserService domainService,
     IConversationAppService conversationService,
     IFbClient fbClient,
     ITwitterClient twitterClient
     )
 {
     _domainService       = domainService;
     _conversationService = conversationService;
     _fbClient            = fbClient;
     _twitterClient       = twitterClient;
 }
示例#14
0
 public UserInfoService(
     IRepository <SocialUser> socialUserRepo,
     IRepository <Message> messageRepo,
     IRepository <Conversation> conversationRepo,
     IRepository <SocialAccount> socialAccountRepo,
     IFbClient fbClient
     )
 {
     _socialUserRepo    = socialUserRepo;
     _messageRepo       = messageRepo;
     _conversationRepo  = conversationRepo;
     _socialAccountRepo = socialAccountRepo;
     _fbClient          = fbClient;
 }
示例#15
0
 public PullJobService(
     IConversationService conversationService,
     IMessageService messageService,
     ISocialUserService socialUserService,
     INotificationManager notificationManager,
     IFbClient fbClient
     )
 {
     _conversationService = conversationService;
     _messageService      = messageService;
     _socialUserService   = socialUserService;
     _notificationManager = notificationManager;
     _fbClient            = fbClient;
     _fbConverter         = new FacebookConverter();
 }
示例#16
0
        private static void ShutdownEntryPointWrapper(IFbClient fbClient)
        {
            // the fb_shutdown does not exists before 2.5
            // the exception is just ignored
            // once <2.5 is not existing we can remove this
            try
            {
                fbClient.fb_shutdown(0, 0);
            }
#if NETSTANDARD1_6
            catch (Exception ex) when(ex.GetType().Name == "EntryPointNotFoundException")
#else
            catch (EntryPointNotFoundException)
#endif
            { }
        }
示例#17
0
 public DependencyResolverBuilder WithFacebookClient(IFbClient service)
 {
     _fbClient = service;
     return(this);
 }
示例#18
0
 public SocialUserService(IFbClient fbClient)
 {
     _fbClient = fbClient;
 }
		public FesDatabase(string dllName, Charset charset)
		{
			_fbClient = FbClientFactory.GetFbClient(dllName);
			_charset = (charset != null ? charset : Charset.DefaultCharset);
			_dialect = 3;
			_packetSize = 8192;
			_statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH];
		}
示例#20
0
 public FesServiceManager(string dllName, Charset charset)
 {
     _fbClient     = FbClientFactory.GetFbClient(dllName);
     _charset      = (charset != null ? charset : Charset.DefaultCharset);
     _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH];
 }
 public FesServiceManager(string dllName, Charset charset)
 {
     _fbClient     = FbClientFactory.Create(dllName);
     _charset      = charset ?? Charset.DefaultCharset;
     _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH];
 }
示例#22
0
		public FesServiceManager(string dllName, Charset charset)
		{
			this.fbClient = FbClientFactory.GetFbClient(dllName);
			this.charset = (charset != null ? charset : Charset.DefaultCharset);
			this.statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH];
		}