/// <summary> /// Initializes a new instance of the <see cref="AdobeConnectXmlAPI" /> class. /// </summary> /// <param name="communicationProvider">The communicaton provider.</param> /// <param name="settings"><see cref="ISdkSettings"/></param> /// <exception cref="System.ArgumentNullException"> /// Argument 'communicationProvider' can not be null. /// or /// Argument 'settings' can not be null. /// or /// Configuration parameter 'serviceURL' can not be null. /// </exception> public AdobeConnectXmlAPI(ICommunicationProvider communicationProvider, ISdkSettings settings) { if (settings == null) { throw new ArgumentNullException("Argument 'settings' can not be null."); } if (string.IsNullOrEmpty(settings.ServiceURL)) { throw new ArgumentNullException("Configuration parameter 'serviceURL' can not be null."); } if (communicationProvider != null) { this.communicationProvider = communicationProvider; } else { throw new ArgumentNullException("Argument 'communicationProvider' can not be null."); } this.settings = settings; this.settings.ServiceURL = this.settings.ServiceURL.TrimEnd(new char[] { '/', '?' }); if (!this.settings.ServiceURL.EndsWith("/api/xml")) { this.settings.ServiceURL = this.settings.ServiceURL + "/api/xml"; } }
public static void Init(ICommunicationProvider instance) { if (instance == null) throw new ArgumentNullException("instance"); if (ms_Instance != null) throw new InvalidOperationException("Communication provider is already installed"); ms_Instance = instance; }
/// <summary> /// Initializes a new instance of the <see cref="AdobeConnectXmlAPI"/> class, using default <see cref="HttpCommunicationProvider"/> and <see cref="SdkSettings"/>. /// </summary> /// <remarks> /// <para>Default constructor expects the following configuration defined:</para> /// <para><add key="ServiceURL" value="https://acrobat.com/api/xml" /></para> /// <para><add key="NetUser" value="[your AC user]" /></para> /// <para><add key="NetPassword" value="[your AC password]" /></para> /// <para>Optional proxy settings:</para> /// <para><settings></para> /// <para><ipv6 enabled="true" /></para> /// <para></settings></para> /// <para><defaultProxy enabled="true" useDefaultCredentials="true"></para> /// <para> <proxy bypassonlocal="True" proxyaddress="http://..." /></para> /// <para></defaultProxy></para> /// </remarks> public AdobeConnectXmlAPI(ICommunicationProvider communicatonProvider) : this(communicatonProvider, new SdkSettings() { ServiceURL = ConfigurationManager.AppSettings["ServiceURL"], NetUser = ConfigurationManager.AppSettings["NetUser"], NetPassword = ConfigurationManager.AppSettings["NetPassword"], NetDomain = ConfigurationManager.AppSettings["NetDomain"], ProxyUrl = ConfigurationManager.AppSettings["ProxyUrl"], UseSessionParam = ConfigurationManager.AppSettings["UseSessionParam"] == null || bool.Parse(ConfigurationManager.AppSettings["UseSessionParam"]) }) { }
public MainWindow() { InitializeComponent(); AppAction.InitData(); #region SETUP TCPCOMMUNICATION FOR REMOTE CONTROLLING tcpProvider = new TcpCommunication(this); stringCommandSender = new StringCommandSender(); stringCommandSender.Provider = tcpProvider; tcpProvider.Start(); #endregion }
public RemoteRuntimeHost(string assemblyQualifiedName) { var msg = $"You have to pass an instance implemented '{ nameof(ICommunicationProvider) }' to '{ nameof(RuntimeHost) }.{ nameof(RuntimeHost.SetNetworkProvider) }'."; if (string.IsNullOrEmpty(assemblyQualifiedName)) { throw new InvalidOperationException(msg); } m_networkProvider2 = Activator.CreateInstance(Type.GetType(assemblyQualifiedName)) as ICommunicationProvider; if (m_networkProvider2 == null) { throw new InvalidOperationException(msg); } }
public StatsClient(IStatsConfig statsConfig) { _statsConfig = statsConfig; if (string.IsNullOrEmpty(_statsConfig.Host)) { throw new ArgumentException("Host must be provided"); } if (_statsConfig.Port <= 0) { throw new ArgumentException("Valid port must be provided"); } if (string.IsNullOrEmpty(_statsConfig.Prefix)) { throw new ArgumentException("Prefix must be provided"); } _communicationProvider = new TcpCommunicationProvider(_statsConfig); }
/// <summary> /// Initializes a new instance of the <see cref="AdobeConnectXmlAPI" /> class. /// </summary> /// <param name="communicationProvider">The communicaton provider.</param> /// <param name="settings"><see cref="ISdkSettings"/></param> /// <exception cref="System.ArgumentNullException"> /// Argument 'communicationProvider' can not be null. /// or /// Argument 'settings' can not be null. /// or /// Configuration parameter 'serviceURL' can not be null. /// </exception> public AdobeConnectXmlAPI(ICommunicationProvider communicationProvider, ISdkSettings settings) { if (communicationProvider == null) { throw new ArgumentNullException("Argument 'communicationProvider' can not be null."); } if (settings == null) { throw new ArgumentNullException("Argument 'settings' can not be null."); } if (string.IsNullOrEmpty(settings.ServiceURL)) { throw new ArgumentNullException("Configuration parameter 'serviceURL' can not be null."); } this.communicationProvider = communicationProvider; this.settings = settings; this.settings.ServiceURL = this.settings.ServiceURL.TrimEnd(new char[] { '/', '?' }); AutoMapper.Mapper.Initialize(cfg => cfg.CreateMissingTypeMaps = true); }
public override void SetNetworkProvider(ICommunicationProvider networkProvider) { throw new NotSupportedException(); }
public DeepSeaClient(ICommunicationProvider provider) { this.provider = provider; }
public DeepSeaServer(ICommunicationProvider provider) { this.provider = provider; }