예제 #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;
 }