コード例 #1
0
 public Buddy(IImManagerInternal manager)
 {
     Helper.GuardNotNull(manager);
     _manager = manager;
     _config  = _manager.Provider.GetDefaultConfig();
     Id       = -1;
 }
コード例 #2
0
ファイル: Buddy.cs プロジェクト: sumritt/PJSIP-PJSUA2-CSharp
 public void create(Account acc, BuddyConfig cfg)
 {
     pjsua2PINVOKE.Buddy_create(swigCPtr, Account.getCPtr(acc), BuddyConfig.getCPtr(cfg));
     if (pjsua2PINVOKE.SWIGPendingException.Pending)
     {
         throw pjsua2PINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #3
0
        public int AddBuddyAndGetId(BuddyConfig buddyCfg)
        {
            Helper.GuardNotNull(buddyCfg);
            var id = NativeConstants.PJSUA_INVALID_ID;

            Helper.GuardError(PJSUA_DLL.IM.pjsua_buddy_add(_mapper.Map(buddyCfg, new pjsua_buddy_config()), ref id));
            return(id);
        }
コード例 #4
0
ファイル: BuddyEngine.cs プロジェクト: iyilm4z/buddy
        public void RegisterDependencies(ContainerBuilder containerBuilder, BuddyConfig buddyConfig)
        {
            containerBuilder.RegisterInstance(this).As <IEngine>().SingleInstance();
            containerBuilder.RegisterInstance(_assemblyProvider).As <IAssemblyProvider>().SingleInstance();
            containerBuilder.RegisterInstance(_typeFinder).As <ITypeFinder>().SingleInstance();

            var dependencyRegistrars = _typeFinder.FindClassesOfType <IDependencyRegistrar>();

            var instances = dependencyRegistrars
                            .Select(dependencyRegistrar => (IDependencyRegistrar)Activator.CreateInstance(dependencyRegistrar))
                            .OrderBy(dependencyRegistrar => dependencyRegistrar.Order);

            foreach (var dependencyRegistrar in instances)
            {
                dependencyRegistrar.Register(containerBuilder, _typeFinder, buddyConfig);
            }
        }
コード例 #5
0
 public void Register(ContainerBuilder builder, ITypeFinder typeFinder, BuddyConfig config)
 {
 }
コード例 #6
0
ファイル: BuddyConfig.cs プロジェクト: Reltik/PJSip-CSharp
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BuddyConfig obj)
 {
     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }
コード例 #7
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BuddyConfig obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
コード例 #8
0
 public BuddyConfig Map(pjsua_buddy_config cfg, BuddyConfig config)
 {
     return(_engine.Map(cfg, config));
 }
コード例 #9
0
 public pjsua_buddy_config Map(BuddyConfig config, pjsua_buddy_config cfg)
 {
     return(_engine.Map(config, cfg));
 }
コード例 #10
0
ファイル: Buddy.cs プロジェクト: Jetsly/pjsip-csharp
 public void create(Account acc, BuddyConfig cfg)
 {
     pjsua2PINVOKE.Buddy_create(swigCPtr, Account.getCPtr(acc), BuddyConfig.getCPtr(cfg));
     if (pjsua2PINVOKE.SWIGPendingException.Pending) throw pjsua2PINVOKE.SWIGPendingException.Retrieve();
 }
コード例 #11
0
 public void Register(ContainerBuilder builder, ITypeFinder typeFinder, BuddyConfig config)
 {
     throw new NotImplementedException();
 }
コード例 #12
0
ファイル: BuddyEngine.cs プロジェクト: iyilm4z/buddy
        public void ConfigureServices(IServiceCollection services, IConfiguration configuration, BuddyConfig buddyConfig)
        {
            _assemblyProvider = new BuddyAssemblyProvider();
            _typeFinder       = new BuddyTypeFinder(_assemblyProvider);

            CallConfigureServicesMethodOfAllStartupClasses(services, configuration, _typeFinder);

            AddAutoMapper(_typeFinder);

            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
        }
コード例 #13
0
 public int AddBuddyAndGetId(BuddyConfig buddyCfg)
 {
     return(0);
 }