本文整理汇总了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");
}
示例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>());
}
示例3: GameModeScene
public GameModeScene(IGameScreenManager manager)
: base(manager)
{
services = (SCSServices)manager.Game.Services.GetService(typeof(SCSServices));
resourceManager = (IResourceManager)manager.Game.Services.GetService(typeof(IResourceManager));
}
示例4: DeltaScriptInclusionFilter
public DeltaScriptInclusionFilter(
IEnumerable<IDeltaInstanceProvider> deltaInstanceProviders,
IResourceManager resourceManager
) {
_deltaInstanceProviders = deltaInstanceProviders;
_resourceManager = resourceManager;
}
示例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);
}
示例6: GetResources
public static IResourceManager GetResources()
{
if (m_instance == null)
m_instance = ResourceManagerFactory.CreateResourceManager();
return m_instance;
}
示例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]);
}
示例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();
}
示例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);
}
}
}
示例10: Hotbar
public Hotbar(IResourceManager resourceManager)
{
_resourceManager = resourceManager;
hotbarBG = resourceManager.GetSprite("main_hotbar");
createSlots();
Update(0);
}
示例11: EditorEnvironment
public EditorEnvironment(
MainEditorWindow mainEditorWindow, IResourceManager resourceManager, IComponentContext context)
{
this.mainEditorWindow = mainEditorWindow;
this.resourceManager = resourceManager;
this.context = context;
}
示例12: MediaController
public MediaController(IResourceManager resourceManager,
IImageHelper imageHelper,
IRepository<ThumbnailSize> thumbRepository) {
_resourceManager = resourceManager;
_imageHelper = imageHelper;
_thumbRepository = thumbRepository;
}
示例13: BinaryResourceFormat
public BinaryResourceFormat(
IResourceManager resourceManager, IComponentContext context, IResourceErrorHandler errorHandler)
{
this.resourceManager = resourceManager;
this.context = context;
this.errorHandler = errorHandler;
}
示例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);
}
示例15: TargetingDummyElement
public TargetingDummyElement(string spriteName, BodyPart part, IResourceManager resourceManager)
{
_resourceManager = resourceManager;
BodyPart = part;
_elementSprite = _resourceManager.GetSprite(spriteName);
Update(0);
}