예제 #1
0
 public static void RemoveStyle(IXmlProvider provider)
 {
     using (XmlReader reader = provider.Open()) {
         string styleName = Scan(reader, Style.NameAttribute);
         styleLookup.Remove(styleName);
     }
 }
예제 #2
0
 public static void AddStyle(IXmlProvider provider)
 {
     using (XmlReader reader = provider.Open()) {
         string styleName = Scan(reader, Style.NameAttribute);
         styleLookup [styleName] = provider;
     }
 }
예제 #3
0
 public GovernmentHandler(
     IFtpProvider ftpProvider,
     IXmlProvider xmlProvider)
 {
     this.ftpProvider = ftpProvider;
     this.xmlProvider = xmlProvider;
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="logger"></param>
 /// <param name="jsonProviders"></param>
 /// <param name="xmlProviders"></param>
 public WebChatProcessRequest(ILogger <WebChatProcessRequest> logger, ICollection <IJsonProvider> jsonProviders,
                              ICollection <IXmlProvider> xmlProviders)
 {
     _logger       = logger;
     _jsonProvider = InjectionSelectionCommon.GetImplement(jsonProviders);
     _xmlProvider  = InjectionSelectionCommon.GetImplement(xmlProviders);
 }
예제 #5
0
        public ImportXmlViewModel(IEventAggregator eventAggregator, IPathProvider filePathProvider, IXmlProvider xmlProvider)
        {
            _eventAggregator  = eventAggregator;
            _filePathProvider = filePathProvider;
            _xmlProvider      = xmlProvider;

            Title = TabNames.ImportToDb.GetDescription();
            SourceComponentExists = false;
            ReplaceIsChecked      = false;

            PDSourceList      = new ObservableCollection <string>();
            PDStatusList      = new ObservableCollection <string>();
            ComponentTypeList = new ObservableCollection <string>();

            PDSourceList.GetEnumValues <PDSource>();
            PDStatusList.GetEnumValues <PDStatus>();
            ComponentTypeList.GetEnumValues <ComponentType>();

            GetFilePathCommand     = new DelegateCommand(GetFolder);
            GetFilenameCommand     = new DelegateCommand(GetFileName);
            ImportComponentCommand = new DelegateCommand(Execute, CanExecute)
                                     .ObservesProperty(() => FileName)
                                     .ObservesProperty(() => FilePath)
                                     .ObservesProperty(() => AllFilesIsChecked);
            UpdateComponentCommand = new DelegateCommand(Execute, CanExecute)
                                     .ObservesProperty(() => FileName);

            PublishedCommand = new DelegateCommand(SetPublishedStatus);

            _eventAggregator.GetEvent <GetFilePathCommand>().Subscribe(FilePathReceived);
            _eventAggregator.GetEvent <GetFilenameCommand>().Subscribe(FileNameReceived);
            _eventAggregator.GetEvent <ComponentExistsCommand>().Subscribe(ExistingComponentReceived);
            _eventAggregator.GetEvent <UpdateComponentSetCommand>().Subscribe(UpdateComponentIdReceived);
        }
예제 #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="logServices"></param>
 /// <param name="jsonProviders"></param>
 /// <param name="xmlProviders"></param>
 public WebChatProcessRequest(ICollection <ILogProvider> logServices, ICollection <IJsonProvider> jsonProviders,
                              ICollection <IXmlProvider> xmlProviders)
 {
     _logService   = InjectionSelectionCommon.GetImplement(logServices);
     _jsonProvider = InjectionSelectionCommon.GetImplement(jsonProviders);
     _xmlProvider  = InjectionSelectionCommon.GetImplement(xmlProviders);
 }
예제 #7
0
 /// <summary>
 /// 短信服务
 /// </summary>
 public SmsService(AliSmsConfig smsConfig, ICollection <IJsonProvider> jsonProviders,
                   ICollection <IXmlProvider> xmlProviders)
 {
     _smsConfig    = smsConfig;
     _jsonProvider = InjectionSelectionCommon.GetImplement(jsonProviders);
     _xmlProvider  = InjectionSelectionCommon.GetImplement(xmlProviders);
     ValidationCommon.Check(smsConfig, "请完善阿里云短信配置信息", HttpStatus.Err.Name);
 }
예제 #8
0
 /// <summary>
 /// 请求接口域
 /// </summary>
 /// <param name="host">域名</param>
 /// <param name="requestBodyFormat">等待响应的数据类型</param>
 /// <param name="requestBodyType">请求类型</param>
 /// <param name="xmlProvider"></param>
 public HttpClient(string host,
                   RequestBodyFormat requestBodyFormat = null,
                   RequestBodyType requestBodyType     = null, IXmlProvider xmlProvider = null) : this(host)
 {
     Host               = host;
     _xmlProvider       = xmlProvider ?? new XmlProvider();
     _requestBodyType   = requestBodyType ?? RequestBodyType.ApplicationJson;
     _requestBodyFormat = requestBodyFormat;
 }
예제 #9
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="data">数据</param>
 /// <param name="requestBodyFormat">请求Body格式</param>
 /// <param name="files">文件信息</param>
 /// <param name="jsonProvider"></param>
 /// <param name="xmlProvider"></param>
 public RequestBody(object data, RequestBodyFormat requestBodyFormat = null,
                    List <RequestMultDataParam> files = null, IJsonProvider jsonProvider = null, IXmlProvider xmlProvider = null)
 {
     Data = data ?? new { };
     RequestBodyFormat = requestBodyFormat ?? RequestBodyFormat.None;
     Files             = files ?? new List <RequestMultDataParam>();
     _jsonProvider     = jsonProvider;
     _xmlProvider      = xmlProvider;
 }
예제 #10
0
        public Service(IDataProvider <TSource> provider,
                       IParser <TSource, TResult> parser, IXmlProvider <TResult> storage)
        {
            this.provider = provider;

            this.parser = parser;

            this.storage = storage;
        }
예제 #11
0
 /// <summary>
 /// 请求接口域
 /// </summary>
 /// <param name="host">域名</param>
 /// <param name="encoding">编码格式 默认Utf8</param>
 /// <param name="requestBodyType">请求类型</param>
 /// <param name="requestBodyFormat">等待响应的数据类型</param>
 /// <param name="xmlProvider"></param>
 public HttpClient(string host, Encoding encoding,
                   RequestBodyType requestBodyType     = null,
                   RequestBodyFormat requestBodyFormat = null, IXmlProvider xmlProvider = null) : this(host, requestBodyType, requestBodyFormat,
                                                                                                       xmlProvider ?? new XmlProvider())
 {
     Host               = host;
     _encoding          = encoding ?? Encoding.UTF8;
     _requestBodyFormat = requestBodyFormat;
 }
예제 #12
0
 public static void RemoveSyntaxMode(IXmlProvider provider)
 {
     using (XmlReader reader = provider.Open()) {
         string mimeTypes = Scan(reader, SyntaxMode.MimeTypesAttribute);
         foreach (string mimeType in mimeTypes.Split(';'))
         {
             syntaxModeLookup.Remove(mimeType);
         }
     }
 }
예제 #13
0
 public ConsoleClient(
     IDepartmentGenerator departmentGenerator,
     IEmployeeGenerator employeeGenerator,
     IProjectGenerator projectGenerator,
     IReportGenerator reportGenerator,
     ICompanyContext companyContext,
     IWorkUnit unitOfWork,
     IXmlProvider xmlProvider)
 {
     this.departmentGenerator = departmentGenerator;
     this.employeeGenerator   = employeeGenerator;
     this.projectGenerator    = projectGenerator;
     this.reportGenerator     = reportGenerator;
     this.companyContext      = companyContext;
     this.unitOfWork          = unitOfWork;
     this.xmlProvider         = xmlProvider;
 }
예제 #14
0
 public PlaylistRepository(ITrackCriteriaService trackCriteriaService, IXmlProvider xmlProvider)
 {
     _trackCriteriaService = trackCriteriaService;
     _xmlProvider          = xmlProvider;
 }
예제 #15
0
 public ApiController(INzbImportProvider import, IXmlProvider xmlProvider)
 {
     _import      = import;
     _xmlProvider = xmlProvider;
 }
예제 #16
0
		public static void AddStyle (IXmlProvider provider)
		{
			using (XmlReader reader = provider.Open ()) {
				string styleName = Scan (reader, Style.NameAttribute);
				styleLookup [styleName] = provider;
			}
		}
예제 #17
0
		public static void RemoveSyntaxMode (IXmlProvider provider)
		{
			using (XmlReader reader = provider.Open ()) {
				string mimeTypes = Scan (reader, SyntaxMode.MimeTypesAttribute);
				foreach (string mimeType in mimeTypes.Split (';')) {
					syntaxModeLookup.Remove (mimeType);
				}
			}
		}
예제 #18
0
		public static void RemoveStyle (IXmlProvider provider)
		{
			using (XmlReader reader = provider.Open ()) {
				string styleName = Scan (reader, ColorScheme.NameAttribute);
				styleLookup.Remove (styleName);
			}
		}
예제 #19
0
 public ApiController(INzbImportProvider import, IXmlProvider xmlProvider)
 {
     _import = import;
     _xmlProvider = xmlProvider;
 }
예제 #20
0
 public TrackRepository(ITrackXmlParser trackXmlParser, IXmlProvider xmlProvider)
 {
     _trackXmlParser = trackXmlParser;
     _xmlProvider    = xmlProvider;
 }
예제 #21
0
        public ConfigSettings(IXmlProvider xmlProvider)
        {
            _xmlProvider = xmlProvider;

            PopulateSettings();
        }
예제 #22
0
 public RssFeedsRepository(IXmlProvider xmlProvider)
 {
     _xmlProvider = xmlProvider;
 }