示例#1
0
 private string GetFileContent(ILocalStrings localString)
 {
     var defaultLocalFile = string.Empty;
     foreach (var property in localString.GetType().GetProperties())
     {
         if (property.Name != "DisplayName")
         {
             defaultLocalFile += string.Format("{0} = {1}\n", property.Name, property.GetValue(localString, null));
         }
     }
     return defaultLocalFile;
 }
示例#2
0
        private string GetFileContent(ILocalStrings localString)
        {
            var defaultLocalFile = string.Empty;

            foreach (var property in localString.GetType().GetProperties())
            {
                if (property.Name != "DisplayName")
                {
                    defaultLocalFile += string.Format("{0} = {1}\n", property.Name, property.GetValue(localString, null));
                }
            }
            return(defaultLocalFile);
        }
示例#3
0
 private void SetLocalizationString(ILocalStrings localStrings, string propertyName, string value)
 {
     localStrings.GetType().GetProperty(propertyName).SetValue(localStrings, value, null);
 }
示例#4
0
 private bool LocalizationStringExists(ILocalStrings localStrings, string propertyName)
 {
     return(localStrings.GetType().GetProperty(propertyName) != null);
 }
示例#5
0
 private void SetLocalizationString(ILocalStrings localStrings, string propertyName, string value)
 {
     localStrings.GetType().GetProperty(propertyName).SetValue(localStrings, value, null);
 }
示例#6
0
 private bool LocalizationStringExists(ILocalStrings localStrings, string propertyName)
 {
     return localStrings.GetType().GetProperty(propertyName) != null;
 }