Ejemplo n.º 1
0
 public static IMTServerBuilder AddDhLayer(this IMTServerBuilder builder, Action <BusOptions> configure = null)
 {
     builder.ServiceCollection.AddTransient <IProtoMessageHanddler, ReqPqHandler>();
     builder.ServiceCollection.AddTransient <IProtoMessageHanddler, ReqDHParamsHandler>();
     builder.ServiceCollection.AddTransient <IProtoMessageHanddler, SetClientDHParamsHandler>();
     builder.ServiceCollection.AddTransient <IProtoMessageHanddler, GetNearestDcHandler>();
     builder.ServiceCollection.AddTransient <IProtoMessageHanddler, PingHandler>();
     builder.ServiceCollection.AddTransient <IProtoMessageHanddler, TLSignInHandler>();
     builder.ServiceCollection.AddTransient <IProtoMessageHanddler, LogOutHandler>();
     return(builder);
 }
Ejemplo n.º 2
0
        public static IMTServerBuilder AddMessages(this IMTServerBuilder builder)
        {
            //IServiceCollection i = null;
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, GetDialogsHandler>();
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, GetHistoryHandler>();
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, SendMessageHandler>();
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, GetStateHandler>();
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, ReadHistoryHandler>();
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, ReceivedMessagesHandler>();
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, Account.UpdateProfileHandler>();

            /// Contact
            ///
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, Contacts.ImportContactsHandler>();
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, Contacts.GetContactsHandler>();

            // Upload
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, Upload.SaveFilePartHandler>();
            builder.ServiceCollection.AddTransient <IProtoMessageHanddler, Photos.UploadProfilePhotoHandler>();

            return(builder);
        }
Ejemplo n.º 3
0
 public static IMTServerBuilder AddMTHttpTransport(this IMTServerBuilder builder, Action <HttpTransportOptions> configure = null)
 {
     builder.ServiceCollection.AddMTHttpTransport(builder.Configuration, configure);
     return(builder);
 }
Ejemplo n.º 4
0
 public static IMTServerBuilder AddBus(this IMTServerBuilder builder, Action <BusOptions> configure = null)
 {
     builder.ServiceCollection.AddMTBus(builder.Configuration, configure);
     return(builder);
 }
Ejemplo n.º 5
0
 public static IMTServerBuilder AddLiteCbStore(this IMTServerBuilder builder, Action <StorageOptions> configure = null)
 {
     builder.ServiceCollection.AddLiteDbStorage(builder.Configuration, configure);
     return(builder);
 }