关于资源文件调用的问题,大家来围观啊!*************************************************************

bustersword 2011-11-16 05:04:33
我调试blogEngine.net 时候发现他调用资源文件 是通过生成一个类(存在于用户temp文件夹的),然后调用.

using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Resources;
using System.Runtime.CompilerServices;

namespace Resources
{
[DebuggerNonUserCode]
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[CompilerGenerated]
public class labels
{
public static string aboutMe { get; }
public static string acceptAnyTextBeforeHostname { get; }
public static string accuracy { get; }
public static string action { get; }
public static string active { get; }
public static string activeThemes { get; }
public static string add { get; }
public static string add_Entry { get; }
public static string addComment { get; }
public static string addCommentsToPages { get; }
public static string addCustomCodeToHeader { get; }
public static string addEditPost { get; }
public static string addFilter { get; }
public static string addNewBlog { get; }
//省略...
}
}


我很奇怪的是,这个文件是怎么个生成的呢,太奇怪了啊,头都大了,高手们快来围观啊!
...全文
101 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
bustersword 2011-11-22
  • 打赏
  • 举报
回复
这悲剧的帖子
bustersword 2011-11-18
  • 打赏
  • 举报
回复
aboutMe     关于我     About Me
accuracy 准确度     Accuracy
action       行为 Action
add       添加 Add
add_Entry 添加文章 Add entry
addComment 添加评论 Add comment
addCommentsToPages 在页面中添加评论 Add Comments to Pages
addCustomCodeToHeader 在HTML头区域添加自定义标签 Add custom code to the HTML head section
addFilter 添加过滤器 Add Filter
addNewRole 添加新角色 Add new role
addToPages 添加到页面 (增加到文章中) Add to pages (in addition to posts)


还是没人回答我啊!就像上面这样的资源文件,是怎么生成如题那样的文件的啊.....
bustersword 2011-11-17
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 ruanwei1987 的回复:]
看半天没理解lz表达意思
[/Quote]

饿,不好意思啊!我也模糊的很
上面这个文件项目里没有的,编译时候生成的,调用就像下面那样
<a runat="server" ID="hlPrev" style="float:left"><%=Resources.labels.previousPosts %></a>
<a runat="server" ID="hlNext" style="float:right"><%=Resources.labels.nextPosts %></a>

我就奇怪这文件在哪搞的,然后编译就出来了......
ruanwei1987 2011-11-17
  • 打赏
  • 举报
回复

看半天没理解lz表达意思
bustersword 2011-11-17
  • 打赏
  • 举报
回复
饿...沉了
不要这样啊

110,566

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧