예제 #1
0
 public Buddy(IImManagerInternal manager)
 {
     Helper.GuardNotNull(manager);
     _manager = manager;
     _config  = _manager.Provider.GetDefaultConfig();
     Id       = -1;
 }
예제 #2
0
 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
        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
 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
 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
        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);
 }