当前位置: 首页>>代码示例>>C#>>正文


C# IResourceHandler类代码示例

本文整理汇总了C#中IResourceHandler的典型用法代码示例。如果您正苦于以下问题:C# IResourceHandler类的具体用法?C# IResourceHandler怎么用?C# IResourceHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IResourceHandler类属于命名空间,在下文中一共展示了IResourceHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnInit

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            _resourceHandler = IoC.Get<IResourceHandler>();
            //_resourceHandler.AddjQuery(Page);
            _resourceHandler.AddjQueryNivoSlider(Page);
            _resourceHandler.AddNivoSliderStyleSheet(Page);

            AddThemeStylesheet();
        }
开发者ID:kirolosgerges,项目名称:Blog,代码行数:10,代码来源:PropertyImageSlideShowViewModeControl.ascx.cs

示例2: RegisterHandler

 public virtual bool RegisterHandler(string url, IResourceHandler handler)
 {
     Uri uri;
     if (Uri.TryCreate(url, UriKind.Absolute, out uri))
     {
         Handlers.AddOrUpdate(uri.ToString(), handler, (k, v) => handler);
         return true;
     }
     return false;
 }
开发者ID:kirkita,项目名称:CefSharp,代码行数:10,代码来源:DefaultResourceHandlerFactory.cs

示例3: RegisterHandler

 public virtual bool RegisterHandler(string url, IResourceHandler handler)
 {
     Uri uri;
     if (Uri.TryCreate(url, UriKind.Absolute, out uri)) {
         lock (Handlers) {
             Handlers[uri.ToString()] = handler;
         }
         return true;
     }
     return false;
 }
开发者ID:bartwe,项目名称:CefSharp,代码行数:11,代码来源:DefaultResourceHandlerFactory.cs

示例4: GlobalSettingsPresenter

        public GlobalSettingsPresenter(
            IGlobalSettingsView view,
            ITranslator translator,
            IGlobalSettingsRepository globalSettingsRepository,
            IResourceHandler resourceHandler)
        {
            if (view == null) throw new ArgumentNullException("view");
            if (translator == null) throw new ArgumentNullException("translator");
            if (globalSettingsRepository == null) throw new ArgumentNullException("globalSettingsRepository");
            if (resourceHandler == null) throw new ArgumentNullException("resourceHandler");
            _view = view;
            _translator = translator;
            _globalSettingsRepository = globalSettingsRepository;
            _resourceHandler = resourceHandler;

            _view.SaveGlobalSettings += SaveGlobalSettings;
            _view.ResetGlobalSettings += ResetGlobalSettings;
        }
开发者ID:kirolosgerges,项目名称:Blog,代码行数:18,代码来源:GlobalSettingsPresenter.cs

示例5: PageTypePickerPresenter

 public PageTypePickerPresenter(
     IPageTypePickerView view,
     ITranslator translator,
     IResourceHandler resourceHandler,
     IPageTypeWrapper pageType,
     HttpContextBase context)
 {
     if (view == null) throw new ArgumentNullException("view");
     if (translator == null) throw new ArgumentNullException("translator");
     if (resourceHandler == null) throw new ArgumentNullException("resourceHandler");
     if (pageType == null) throw new ArgumentNullException("pageType");
     if (context == null) throw new ArgumentNullException("context");
     _view = view;
     _translator = translator;
     _resourceHandler = resourceHandler;
     _pageType = pageType;
     _context = context;
     _log = Log.For(this);
 }
开发者ID:kirolosgerges,项目名称:Blog,代码行数:19,代码来源:PageTypePickerPresenter.cs

示例6: UserSettingsPresenter

        public UserSettingsPresenter(
            IUserSettingsView view,
            ITranslator translator,
            IGlobalSettingsRepository globalSettingsRepository,
            IResourceHandler resourceHandler,
            HttpContextBase context)
        {
            if (view == null) throw new ArgumentNullException("view");
            if (translator == null) throw new ArgumentNullException("translator");
            if (globalSettingsRepository == null) throw new ArgumentNullException("globalSettingsRepository");
            if (resourceHandler == null) throw new ArgumentNullException("resourceHandler");
            if (context == null) throw new ArgumentNullException("context");
            _view = view;
            _translator = translator;
            _globalSettingsRepository = globalSettingsRepository;
            _resourceHandler = resourceHandler;
            _context = context;
            _log = Log.For(this);

            _view.LoadUserSettings += HandleLoadSettings;
            _view.SaveUserSettings += HandleSaveSettings;
        }
开发者ID:kirolosgerges,项目名称:Blog,代码行数:22,代码来源:UserSettingsPresenter.cs

示例7: OnEndLoad

		protected override void OnEndLoad ()
		{
			// The resource handler policy may have changed after loading, so reset any
			// previously allocated resource handler
			resourceHandler = null;

			// Just after loading, the resource Ids are using the file format's policy.
			// They have to be converted to the new policy
			IResourceHandler handler = ItemHandler as IResourceHandler;
			if (handler != null)
				MigrateResourceIds (handler, ResourceHandler);

			base.OnEndLoad ();
		}
开发者ID:John-Colvin,项目名称:monodevelop,代码行数:14,代码来源:DotNetProject.cs

示例8: SetItemHandler

		internal override void SetItemHandler (ISolutionItemHandler handler)
		{
			if (ProjectExtensionUtil.GetItemHandler (this) == null) {
				// Initial assignment of the item handler
				base.SetItemHandler (handler);
				return;
			}
			IResourceHandler rh = ResourceHandler;

			base.SetItemHandler (handler);
			resourceHandler = null;
			// A change in the file format may imply a change in the resource naming policy.
			// Make sure that the resource Id don't change.
			MigrateResourceIds (rh, ResourceHandler);
		}
开发者ID:John-Colvin,项目名称:monodevelop,代码行数:15,代码来源:DotNetProject.cs

示例9: OnEndLoad

		protected override void OnEndLoad ()
		{
			// The resource handler policy may have changed after loading, so reset any
			// previously allocated resource handler
			resourceHandler = null;

			// Just after loading, the resource Ids are using the file format's policy.
			// They have to be converted to the new policy
			IResourceHandler handler = ItemHandler as IResourceHandler;
			if (handler != null)
				MigrateResourceIds (handler, ResourceHandler);
			
			if (String.IsNullOrEmpty (defaultNamespace))
				defaultNamespace = SanitisePotentialNamespace (Name);

			base.OnEndLoad ();
		}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:17,代码来源:DotNetProject.cs

示例10: GetResourceId

		internal string GetResourceId (IResourceHandler resourceHandler)
		{
			if (string.IsNullOrEmpty (resourceId))
				return resourceHandler.GetDefaultResourceId (this);
			return resourceId;
		}
开发者ID:nerzhulart,项目名称:monodevelop,代码行数:6,代码来源:ProjectFile.cs

示例11: PageExplorerAdapter

 public PageExplorerAdapter()
 {
     _translator = IoC.Get<ITranslator>();
     _resourceHandler = IoC.Get<IResourceHandler>();
     _roleStrategy = IoC.Get<IRoleStrategy>();
 }
开发者ID:kirolosgerges,项目名称:Blog,代码行数:6,代码来源:PageExplorerAdapter.cs

示例12: ConversionManager

 public ConversionManager(IResourceHandler fileHandler, IResourceHandler registryHandler, IEncoder encoder)
 {
     _fileHandler = fileHandler;
     _registryHandler = registryHandler;
     _encoder = encoder;
 }
开发者ID:binglot,项目名称:Bin2Reg,代码行数:6,代码来源:ConversionManager.cs

示例13: UpdateResourceHandler

		public void UpdateResourceHandler (bool keepOldIds)
		{
			IResourceHandler oldHandler = resourceHandler;
			resourceHandler = null;
			if (keepOldIds && oldHandler != null)
				MigrateResourceIds (oldHandler, ResourceHandler);
		}
开发者ID:John-Colvin,项目名称:monodevelop,代码行数:7,代码来源:DotNetProject.cs

示例14: MigrateResourceIds

		void MigrateResourceIds (IResourceHandler oldHandler, IResourceHandler newHandler)
		{
			if (oldHandler.GetType () != newHandler.GetType ()) {
				// If the file format has a default resource handler different from the one
				// choosen for this project, then all resource ids must be converted
				foreach (ProjectFile file in Files.Where (f => f.BuildAction == BuildAction.EmbeddedResource)) {
					if (file.Subtype == Subtype.Directory)
						continue;
					string oldId = file.GetResourceId (oldHandler);
					string newId = file.GetResourceId (newHandler);
					string newDefault = newHandler.GetDefaultResourceId (file);
					if (oldId != newId) {
						if (newDefault == oldId)
							file.ResourceId = null;
						else
							file.ResourceId = oldId;
					} else {
						if (newDefault == oldId)
							file.ResourceId = null;
					}
				}
			}
		}
开发者ID:John-Colvin,项目名称:monodevelop,代码行数:23,代码来源:DotNetProject.cs

示例15: RegisterHandler

 public virtual void RegisterHandler(string url, IResourceHandler handler)
 {
     Handlers[url] = handler;
 }
开发者ID:klkn,项目名称:CefSharp,代码行数:4,代码来源:DefaultResourceHandlerFactory.cs


注:本文中的IResourceHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。