Exemple #1
0
 public static string GetString(this IResource resource, Encoding encoding)
 {
     byte[] bytes = ResourceExtensions.GetBytes(resource);
     if (bytes != null)
     {
         return(encoding.GetString(bytes));
     }
     else
     {
         return((string)null);
     }
 }
Exemple #2
0
 public void ApplyTo(IResourceLibraryCache libraryCache)
 {
     foreach (string index in this.Libraries)
     {
         IResourceLibrary resourceLibrary1 = this[index];
         IResourceLibrary resourceLibrary2 = libraryCache[index];
         foreach (int num in resourceLibrary1.ResourceTypes)
         {
             foreach (IResource resource in resourceLibrary1[(object)num])
             {
                 ResourceExtensions.Update(resourceLibrary2.GetResource(resource.Name, (object)num), ResourceExtensions.GetBytes(resource));
             }
         }
     }
 }
Exemple #3
0
 public static void Update(this IResource resource, string data, Encoding encoding)
 {
     ResourceExtensions.Update(resource, data, encoding, resource.Library.DefaultLanguage);
 }