示例#1
0
 public WorkflowActionAggregationExecutor(ILogger logger, IWebAPIClient webApiClient, Func <IDictionary <Type, IWorkflowActionExecutor> > workflowExecutorsFunc)
     : base(logger, webApiClient)
 {
     _logger                = logger;
     _webAPIClient          = webApiClient;
     _workflowExecutorsFunc = workflowExecutorsFunc;
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='userInfo'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <string> ApiAccountTokenGetAsync(this IWebAPIClient operations, UserInfo userInfo = default(UserInfo), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiAccountTokenGetWithHttpMessagesAsync(userInfo, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 public PECMailContentTypeExecutor(ILogger logger, IWebAPIClient webApiClient, BiblosClient biblosClient, ServiceBus.ServiceBusClient serviceBusClient)
     : base(logger, webApiClient, biblosClient, serviceBusClient)
 {
     _logger       = logger;
     _webApiClient = webApiClient;
     _biblosClient = biblosClient;
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='login'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <string> ApiAccountLoginPostAsync(this IWebAPIClient operations, LoginModel login = default(LoginModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiAccountLoginPostWithHttpMessagesAsync(login, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#5
0
        public CQRSBaseExecution(ILogger logger, IWebAPIClient webApiClient, BiblosDS.BiblosClient biblosClient, ServiceBus.ServiceBusClient serviceBusClient)
        {
            _logger           = logger;
            _webApiClient     = webApiClient;
            _biblosClient     = biblosClient;
            _commandExecutors = new Dictionary <Type, IBaseCommonExecutor>();
            IProtocolContentTypeExecutor           protocolContentTypeExecutor           = new ProtocolContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);
            IResolutionContentTypeExecutor         resolutionContentTypeExecutor         = new ResolutionContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);
            IDocumentSeriesItemContentTypeExecutor documentSeriesItemContentTypeExecutor = new DocumentSeriesItemContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);
            IUDSContentTypeExecutor                  udsContentTypeExecutor                  = new UDSContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);
            IPECMailContentTypeExecutor              pecContentTypeExecutor                  = new PECMailContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);
            IFascicleContentTypeExecutor             fascicleContentTypeExecutor             = new FascicleContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);
            IMessageContentTypeExecutor              messageContentTypeExecutor              = new MessageContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);
            ICollaborationContentTypeExecutor        collaborationContentTypeExecutor        = new CollaborationContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);
            ICategoryFascicleContentTypeExecutor     categoryFascicleContentTypeExecutor     = new CategoryFascicleContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);
            IFascicleDocumentUnitContentTypeExecutor fascicleDocumentUnitContentTypeExecutor = new FascicleDocumentUnitContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);
            IDossierContentTypeExecutor              dossierContentTypeExecutor              = new DossierContentTypeExecutor(logger, webApiClient, biblosClient, serviceBusClient);

            _commandExecutors.Add(typeof(Protocol), protocolContentTypeExecutor);
            _commandExecutors.Add(typeof(ResolutionModel), resolutionContentTypeExecutor);
            _commandExecutors.Add(typeof(DocumentSeriesItem), documentSeriesItemContentTypeExecutor);
            _commandExecutors.Add(typeof(UDSBuildModel), udsContentTypeExecutor);
            _commandExecutors.Add(typeof(PECMail), pecContentTypeExecutor);
            _commandExecutors.Add(typeof(Fascicle), fascicleContentTypeExecutor);
            _commandExecutors.Add(typeof(Message), messageContentTypeExecutor);
            _commandExecutors.Add(typeof(Collaboration), collaborationContentTypeExecutor);
            _commandExecutors.Add(typeof(CategoryFascicle), categoryFascicleContentTypeExecutor);
            _commandExecutors.Add(typeof(FascicleDocumentUnit), fascicleDocumentUnitContentTypeExecutor);
            _commandExecutors.Add(typeof(Dossier), dossierContentTypeExecutor);
        }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <ApplicationUser> > ApiAccountAllGetAsync(this IWebAPIClient operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiAccountAllGetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <bool?> ApiAccountRegisterPostAsync(this IWebAPIClient operations, RegisterModel model = default(RegisterModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiAccountRegisterPostWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <string> > ApiAccountGetRolesGetAsync(this IWebAPIClient operations, string id = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiAccountGetRolesGetWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#9
0
 public Execution(ILogger logger, IWebAPIClient webApiClient, BiblosClient biblosClient)
 {
     _logger             = logger;
     _biblosClient       = biblosClient;
     _webApiClient       = webApiClient;
     _biblosArchives     = _biblosClient.Document.GetArchives();
     _serializerSettings = new JsonSerializerSettings
     {
         NullValueHandling          = NullValueHandling.Ignore,
         TypeNameHandling           = TypeNameHandling.Objects,
         ReferenceLoopHandling      = ReferenceLoopHandling.Ignore,
         PreserveReferencesHandling = PreserveReferencesHandling.All
     };
     try
     {
         short?fascicleLocationId = _webApiClient.GetParameterFascicleMiscellaneaLocation().Result;
         if (fascicleLocationId.HasValue)
         {
             _fascicleLocation = _webApiClient.GetLocationAsync(fascicleLocationId.Value).Result;
         }
         if (_fascicleLocation == null)
         {
             throw new ArgumentException("Fascicle Location is empty", "FascicleLocation");
         }
     }
     catch (Exception ex)
     {
         _logger.WriteError(new LogMessage("error orrouring in get fascicle parameters"), ex, LogCategories);
         throw;
     }
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='role'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <bool?> ApiAccountRemoveFronRoleDeleteAsync(this IWebAPIClient operations, string id = default(string), string role = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiAccountRemoveFronRoleDeleteWithHttpMessagesAsync(id, role, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public GatewayCheckoutService(IWebAPIClient webApiClient, ITranslatorService translatorService, IHttpContextService httpContextService, IRepository repository)
 {
     _webApiClient       = webApiClient;
     _translatorService  = translatorService;
     _httpContextService = httpContextService;
     _repository         = repository;
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='name'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <bool?> ApiAccountChangeUserNamePutAsync(this IWebAPIClient operations, string id = default(string), string name = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiAccountChangeUserNamePutWithHttpMessagesAsync(id, name, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 public FascicleDocumentUnitContentTypeExecutor(ILogger logger, IWebAPIClient webApiClient, BiblosClient biblosClient, ServiceBus.ServiceBusClient serviceBusClient)
     : base(logger, webApiClient, biblosClient, serviceBusClient)
 {
     _logger       = logger;
     _webApiClient = webApiClient;
     _biblosClient = biblosClient;
 }
示例#14
0
 public Execution(ILogger logger, IWebAPIClient webApiClient)
 {
     _logger             = logger;
     _webApiClient       = webApiClient;
     _serializerSettings = new JsonSerializerSettings
     {
         NullValueHandling          = NullValueHandling.Ignore,
         TypeNameHandling           = TypeNameHandling.Objects,
         ReferenceLoopHandling      = ReferenceLoopHandling.Ignore,
         PreserveReferencesHandling = PreserveReferencesHandling.All
     };
 }
示例#15
0
 public Execution(ILogger logger, IWebAPIClient webApiClient, BiblosClient biblosClient)
 {
     _logger       = logger;
     _biblosClient = biblosClient;
     _webApiClient = webApiClient;
     //_stampaConformeClient = stampaConformeClient;
     _biblosArchives     = _biblosClient.Document.GetArchives();
     _serializerSettings = new JsonSerializerSettings
     {
         NullValueHandling          = NullValueHandling.Ignore,
         TypeNameHandling           = TypeNameHandling.Objects,
         ReferenceLoopHandling      = ReferenceLoopHandling.Ignore,
         PreserveReferencesHandling = PreserveReferencesHandling.All
     };
 }
示例#16
0
 public Execution(ILogger logger, IWebAPIClient webApiClient, BiblosClient biblosClient)
 {
     _logger             = logger;
     _biblosClient       = biblosClient;
     _webApiClient       = webApiClient;
     _serializerSettings = new JsonSerializerSettings
     {
         NullValueHandling          = NullValueHandling.Ignore,
         TypeNameHandling           = TypeNameHandling.Objects,
         ReferenceLoopHandling      = ReferenceLoopHandling.Ignore,
         PreserveReferencesHandling = PreserveReferencesHandling.All
     };
     _fascicleTypeInsertActionDescription = new Dictionary <DocSuiteWeb.Model.Entities.Fascicles.FascicleType, string> {
         { DocSuiteWeb.Model.Entities.Fascicles.FascicleType.Activity, EnumHelper.GetDescription(InsertActionType.InsertActivityFascicle) },
         { DocSuiteWeb.Model.Entities.Fascicles.FascicleType.Procedure, EnumHelper.GetDescription(InsertActionType.InsertProcedureFascicle) }
     };
 }
示例#17
0
        public Execution(ILogger logger, IWebAPIClient webApiClient, BiblosClient biblosClient)
        {
            _logger             = logger;
            _biblosClient       = biblosClient;
            _webApiClient       = webApiClient;
            _serializerSettings = new JsonSerializerSettings
            {
                NullValueHandling          = NullValueHandling.Ignore,
                TypeNameHandling           = TypeNameHandling.Objects,
                ReferenceLoopHandling      = ReferenceLoopHandling.Ignore,
                PreserveReferencesHandling = PreserveReferencesHandling.All
            };
            _biblosArchives = _biblosClient.Document.GetArchives();

            short locationId = _webApiClient.GetParameterMessageLocation().Result.Value;

            _attachementLocation = this._webApiClient.GetLocationAsync(locationId).Result;
        }
示例#18
0
 public ListenerMessageBase(MessageReceiver receiver, ILogger logger,
                            IListenerExecution <TCommand> listenerExecution, string commandName, IWebAPIClient webApiClient, bool commandNameFilterEnabled = true)
 {
     _logger      = logger;
     _commandName = commandName;
     _commandNameFilterEnabled = commandNameFilterEnabled;
     _receiver           = receiver;
     _listenerExecution  = listenerExecution;
     _webApiClient       = webApiClient;
     _serializerSettings = new JsonSerializerSettings
     {
         NullValueHandling          = NullValueHandling.Ignore,
         TypeNameHandling           = TypeNameHandling.Objects,
         ReferenceLoopHandling      = ReferenceLoopHandling.Ignore,
         PreserveReferencesHandling = PreserveReferencesHandling.All
     };
     _logger.WriteInfo(new LogMessage("Create new listener base"), LogCategories);
 }
示例#19
0
        public BaseCommonExecutor(ILogger logger, IWebAPIClient webApiClient, BiblosDS.BiblosClient biblosClient, ServiceBus.ServiceBusClient serviceBusClient)
        {
            _webApiClient            = webApiClient;
            _biblosClient            = biblosClient;
            _serviceBusClient        = serviceBusClient;
            _logger                  = logger;
            _workflowActionExecutors = new Dictionary <Type, IWorkflowActionExecutor>();
            IWorkflowActionFascicleExecutor               workflowActionFascicleExecutor               = new WorkflowActionFascicleExecutor(logger, webApiClient);
            IWorkflowActionDocumentUnitLinkExecutor       workflowActionDocumentUnitLinkExecutor       = new WorkflowActionDocumentUnitLinkExecutor(logger, webApiClient);
            IWorkflowActionFascicleCloseExecutor          workflowActionFascicleCloseExecutor          = new WorkflowActionFascicleCloseExecutor(logger, webApiClient);
            IWorkflowActionAggregationExecutor            workflowActionAggregationExecutor            = new WorkflowActionAggregationExecutor(logger, webApiClient, () => _workflowActionExecutors);
            IWorkflowActionShareDocumentUnitModelExecutor workflowActionShareDocumentUnitModelExecutor = new WorkflowActionShareDocumentUnitModelExecutor(logger, webApiClient);

            _workflowActionExecutors.Add(typeof(WorkflowActionFascicleModel), workflowActionFascicleExecutor);
            _workflowActionExecutors.Add(typeof(WorkflowActionDocumentUnitLinkModel), workflowActionDocumentUnitLinkExecutor);
            _workflowActionExecutors.Add(typeof(WorkflowActionFascicleCloseModel), workflowActionFascicleCloseExecutor);
            _workflowActionExecutors.Add(typeof(WorkflowActionAggregationExecutor), workflowActionAggregationExecutor);
            _workflowActionExecutors.Add(typeof(WorkflowActionShareDocumentUnitModel), workflowActionShareDocumentUnitModelExecutor);
        }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// </param>
 public static RegisterResult ApiAccountRegisterForIdResultPost(this IWebAPIClient operations, RegisterModel model = default(RegisterModel))
 {
     return(Task.Factory.StartNew(s => ((IWebAPIClient)s).ApiAccountRegisterForIdResultPostAsync(model), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='login'>
 /// </param>
 public static string ApiAccountLoginPost(this IWebAPIClient operations, LoginModel login = default(LoginModel))
 {
     return(Task.Factory.StartNew(s => ((IWebAPIClient)s).ApiAccountLoginPostAsync(login), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='userInfo'>
 /// </param>
 public static string ApiAccountTokenGet(this IWebAPIClient operations, UserInfo userInfo = default(UserInfo))
 {
     return(Task.Factory.StartNew(s => ((IWebAPIClient)s).ApiAccountTokenGetAsync(userInfo), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#23
0
 public AccountController()
 {
     UserService = new UserServiceClient();
     UserAPI     = new WebAPIClient(new Uri("https://localhost:44319/"), new BasicAuthenticationCredentials());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static IList <string> ApiAccountGetRolesGet(this IWebAPIClient operations, string id = default(string))
 {
     return(Task.Factory.StartNew(s => ((IWebAPIClient)s).ApiAccountGetRolesGetAsync(id), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='token'>
 /// </param>
 /// <param name='password'>
 /// </param>
 /// <param name='newPassword'>
 /// </param>
 public static bool?ApiAccountChangePasswordPut(this IWebAPIClient operations, string token = default(string), string password = default(string), string newPassword = default(string))
 {
     return(Task.Factory.StartNew(s => ((IWebAPIClient)s).ApiAccountChangePasswordPutAsync(token, password, newPassword), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <ApplicationUser> ApiAccountAllGet(this IWebAPIClient operations)
 {
     return(Task.Factory.StartNew(s => ((IWebAPIClient)s).ApiAccountAllGetAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task ApiAccountLogOffGetAsync(this IWebAPIClient operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.ApiAccountLogOffGetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false);
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static void ApiAccountLogOffGet(this IWebAPIClient operations)
 {
     Task.Factory.StartNew(s => ((IWebAPIClient)s).ApiAccountLogOffGetAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
示例#29
0
 public Listener(MessageReceiver receiver, ILogger logger, IWebAPIClient webApiClient, BiblosDS.BiblosClient biblosClient)
     : base(receiver, logger, new Execution(logger, webApiClient, biblosClient), "CommandUpdateFascicleData", webApiClient)
 {
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='name'>
 /// </param>
 public static bool?ApiAccountChangeUserNamePut(this IWebAPIClient operations, string id = default(string), string name = default(string))
 {
     return(Task.Factory.StartNew(s => ((IWebAPIClient)s).ApiAccountChangeUserNamePutAsync(id, name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }