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


C# IResourceManager类代码示例

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


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

示例1: YammerAuthProvider

 /// <summary>
 /// Initializes a new instance of the <see cref="YammerAuthProvider"/> class.
 /// </summary>
 /// <param name="appSettings">
 /// The application settings (in web.config).
 /// </param>
 public YammerAuthProvider(IResourceManager appSettings)
     : base(appSettings, appSettings.GetString("oauth.yammer.Realm"), Name, "ClientId", "AppSecret")
 {
     this.ClientId = appSettings.GetString("oauth.yammer.ClientId");
     this.ClientSecret = appSettings.GetString("oauth.yammer.ClientSecret");
     this.PreAuthUrl = appSettings.GetString("oauth.yammer.PreAuthUrl");
 }
开发者ID:Qasemt,项目名称:NServiceKit,代码行数:13,代码来源:YammerAuthProvider.cs

示例2: AppConfig

 public AppConfig(IResourceManager appSettings)
 {
     this.Env = appSettings.Get("Env", Env.Local);
     this.EnableCdn = appSettings.Get("EnableCdn", false);
     this.CdnPrefix = appSettings.Get("CdnPrefix", "");
     this.AdminUserNames = appSettings.Get("AdminUserNames", new List<string>());
 }
开发者ID:peter-dangelo,项目名称:ServiceStackMVC,代码行数:7,代码来源:AppHost.cs

示例3: GameModeScene

        public GameModeScene(IGameScreenManager manager)
            : base(manager)
        {
            services = (SCSServices)manager.Game.Services.GetService(typeof(SCSServices));

            resourceManager = (IResourceManager)manager.Game.Services.GetService(typeof(IResourceManager));
        }
开发者ID:doanhtdpl,项目名称:boom-game,代码行数:7,代码来源:GameModeScene.cs

示例4: DeltaScriptInclusionFilter

 public DeltaScriptInclusionFilter(
     IEnumerable<IDeltaInstanceProvider> deltaInstanceProviders,
     IResourceManager resourceManager
     ) {
         _deltaInstanceProviders = deltaInstanceProviders;
         _resourceManager = resourceManager;
 }
开发者ID:akhurst,项目名称:ricealumni,代码行数:7,代码来源:DeltaScriptInclusionFilter.cs

示例5: BlueprintButton

        public BlueprintButton(string c1, string c1N, string c2, string c2N, string res, string resname,
                               IResourceManager resourceManager)
        {
            _resourceManager = resourceManager;

            Compo1 = c1;
            Compo1Name = c1N;

            Compo2 = c2;
            Compo2Name = c2N;

            Result = res;
            ResultName = resname;

            _icon = _resourceManager.GetSprite("blueprint");

            Label = new TextSprite("blueprinttext", "", _resourceManager.GetFont("CALIBRI"))
                        {
                            Color = Color.GhostWhite,
                            ShadowColor = Color.DimGray,
                            ShadowOffset = new Vector2(1, 1),
                            Shadowed = true
                        };

            Update(0);
        }
开发者ID:millpond,项目名称:space-station-14,代码行数:26,代码来源:BlueprintButton.cs

示例6: GetResources

        public static IResourceManager GetResources()
        {
            if (m_instance == null)
                m_instance = ResourceManagerFactory.CreateResourceManager();

            return m_instance;            
        }
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:ResourcesCache.cs

示例7: FacebookAuthProvider

 public FacebookAuthProvider(IResourceManager appSettings)
     : base(appSettings, Realm, Name, "AppId", "AppSecret")
 {
     this.AppId = appSettings.GetString("oauth.facebook.AppId");
     this.AppSecret = appSettings.GetString("oauth.facebook.AppSecret");
     this.Permissions = appSettings.Get("oauth.facebook.Permissions", new string[0]);
 }
开发者ID:namman,项目名称:ServiceStack,代码行数:7,代码来源:FacebookAuthProvider.cs

示例8: BuildBranch

        public RequestDelegate BuildBranch(IApplicationBuilder app, IEnumerable<IResourceStartup> resourceStartups, IEnumerable<IResource> resources, IResourceManager resourceManager)
        {
            var branchApp = app.New();
            branchApp.Map($"/{_serverOptions.BasePath}", glimpseApp =>
            {
                // REGISTER: resource startups
                foreach (var resourceStartup in resourceStartups)
                {
                    var startupApp = glimpseApp.New();

                    var resourceBuilderStartup = new ResourceBuilder(startupApp, resourceManager);
                    resourceStartup.Configure(resourceBuilderStartup);

                    glimpseApp.Use(next =>
                    {
                        startupApp.Run(next);

                        var startupBranch = startupApp.Build();

                        return context =>
                        {
                            if (CanExecute(context, resourceStartup.Type))
                            {
                                return startupBranch(context);
                            }

                            return next(context);
                        };
                    });
                }

                // REGISTER: resources
                var resourceBuilder = new ResourceBuilder(glimpseApp, resourceManager);
                foreach (var resource in resources)
                {
                    resourceBuilder.Run(resource.Name, resource.Parameters?.GenerateUriTemplate(), resource.Type, resource.Invoke);
                }

                glimpseApp.Run(async context =>
                {
                    // RUN: resources
                    var result = resourceManager.Match(context);
                    if (result != null)
                    {
                        if (CanExecute(context, result.Type))
                        {
                            await result.Resource(context, result.Paramaters);
                        }
                        else
                        {
                            // TODO: Review, do we want a 401, 404 or continue users pipeline 
                            context.Response.StatusCode = 401;
                        }
                    }
                });
            });
            branchApp.Use(subNext => { return async ctx => await _next(ctx); });

            return branchApp.Build();
        }
开发者ID:mike-kaufman,项目名称:Glimpse.Prototype,代码行数:60,代码来源:GlimpseServerMiddleware.cs

示例9: Load

    public void Load(IDataNode dataNode, IResourceManager resourceManager)
    {
      _shaderName = dataNode.ReadParameter("key");
      _vertexShader = dataNode.ReadParameter("vertex");
      _fragmentShader = dataNode.ReadParameter("fragment");

      if (dataNode.HasParameter("numbers"))
      {
        var floats = dataNode.ReadParameterList("numbers");
        foreach (var f in floats)
        {
          _numericParameters.Add(f, default(float));
        }
      }

      if (dataNode.HasParameter("vectors"))
      {
        var vectors = dataNode.ReadParameterList("vectors");
        foreach (var v in vectors)
        {
          _vectorParameters.Add(v, default(Vector3));
        }
      }


      if (dataNode.HasParameter("textures"))
      {
        var textures = dataNode.ReadParameterList("textures");
        foreach (var t in textures)
        {
          _textureParameters.Add(t, null);
        }
      }

    }
开发者ID:dgopena,项目名称:Starter3D.Base,代码行数:35,代码来源:Shader.cs

示例10: Hotbar

 public Hotbar(IResourceManager resourceManager)
 {
     _resourceManager = resourceManager;
     hotbarBG = resourceManager.GetSprite("main_hotbar");
     createSlots();
     Update(0);
 }
开发者ID:Gartley,项目名称:ss13remake,代码行数:7,代码来源:Hotbar.cs

示例11: EditorEnvironment

		public EditorEnvironment(
			MainEditorWindow mainEditorWindow, IResourceManager resourceManager, IComponentContext context)
		{
			this.mainEditorWindow = mainEditorWindow;
			this.resourceManager = resourceManager;
			this.context = context;
		}
开发者ID:gleblebedev,项目名称:toe,代码行数:7,代码来源:EditorEnvironment.cs

示例12: MediaController

 public MediaController(IResourceManager resourceManager,
     IImageHelper imageHelper,
     IRepository<ThumbnailSize> thumbRepository) {
     _resourceManager = resourceManager;
     _imageHelper = imageHelper;
     _thumbRepository = thumbRepository;
 }
开发者ID:wolfweb,项目名称:Ww,代码行数:7,代码来源:MediaController.cs

示例13: BinaryResourceFormat

		public BinaryResourceFormat(
			IResourceManager resourceManager, IComponentContext context, IResourceErrorHandler errorHandler)
		{
			this.resourceManager = resourceManager;
			this.context = context;
			this.errorHandler = errorHandler;
		}
开发者ID:gleblebedev,项目名称:toe,代码行数:7,代码来源:BinaryResourceFormat.cs

示例14: HealthScannerWindow

        public HealthScannerWindow(Entity assignedEnt, Vector2D mousePos, UserInterfaceManager uiMgr,
                                   IResourceManager resourceManager)
        {
            _resourceManager = resourceManager;
            assigned = assignedEnt;
            _uiMgr = uiMgr;

            _overallHealth = new TextSprite("hpscan" + assignedEnt.Uid.ToString(), "",
                                            _resourceManager.GetFont("CALIBRI"));
            _overallHealth.Color = Color.ForestGreen;

            _background = _resourceManager.GetSprite("healthscan_bg");

            _head = _resourceManager.GetSprite("healthscan_head");
            _chest = _resourceManager.GetSprite("healthscan_chest");
            _arml = _resourceManager.GetSprite("healthscan_arml");
            _armr = _resourceManager.GetSprite("healthscan_armr");
            _groin = _resourceManager.GetSprite("healthscan_groin");
            _legl = _resourceManager.GetSprite("healthscan_legl");
            _legr = _resourceManager.GetSprite("healthscan_legr");

            Position = new Point((int) mousePos.X, (int) mousePos.Y);

            Setup();
            Update(0);
        }
开发者ID:Gartley,项目名称:ss13remake,代码行数:26,代码来源:HealthScannerWindow.cs

示例15: TargetingDummyElement

 public TargetingDummyElement(string spriteName, BodyPart part, IResourceManager resourceManager)
 {
     _resourceManager = resourceManager;
     BodyPart = part;
     _elementSprite = _resourceManager.GetSprite(spriteName);
     Update(0);
 }
开发者ID:Tri125,项目名称:space-station-14,代码行数:7,代码来源:TargetingDummyElement.cs


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