string LoadSourceCode(Type type) { string resourcePath = string.Format("/{0};component/Data/DataAnnotations/{1}{2}", type.Assembly.FullName.Split(',')[0], type.Name, DemoHelper.GetCodeSuffix(type.Assembly)); StreamResourceInfo resource = Application.GetResourceStream(new Uri(resourcePath, UriKind.Relative)); return(resource != null ? new StreamReader(resource.Stream).ReadToEnd() : null); }
public static string GetCodeFileName(String moduleName) { return(String.Format("{0}.xaml{1}", moduleName, DemoHelper.GetCodeSuffix(typeof(CodeFileLoadHelper).Assembly))); }