コード例 #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="TeraClient" /> class using the specified configuration.
 /// </summary>
 /// <param name="clientConfiguration">The configuration for the <see cref="TeraClient" />.</param>
 /// <param name="dispatcherConfiguration">
 ///     The configuration for the <see cref="Lotus.Dispatching.Dispatcher" /> that will
 ///     be used internally to dispatch messages.
 /// </param>
 public TeraClient(
     TeraClientConfiguration clientConfiguration,
     DispatcherConfiguration dispatcherConfiguration)
 {
     configuration    = clientConfiguration;
     serializer       = new TeraSerializer(new MemoryStream(outputBuffer), configuration);
     exceptionHandler = configuration.UnhandledExceptionHandler ??
                        throw new ArgumentNullException(nameof(configuration.UnhandledExceptionHandler));
     dispatcherConfiguration.ModuleTypes.Add(typeof(CoreModule));
     Dispatcher = new Dispatcher(dispatcherConfiguration);
 }
コード例 #2
0
ファイル: CoreModule.cs プロジェクト: Saegusae/Tera
 private void OnConfigurationReceived(TeraClientConfiguration configuration)
 => systemMessageReader = new SystemMessageReader(configuration.SystemMessageTypes);