示例#1
0
 public static ExportStyleManager GetInstance(string fileName, Stream stream)
 {
     if (ExportCustomProvider.IsValidFileName(fileName))
     {
         return(GetFileInstance(fileName));
     }
     else
     {
         if (ExportCustomProvider.IsValidStream(stream))
         {
             return(GetStreamInstance(stream));
         }
         else
         {
             throw new ExportCacheException("Can't create the instance of ExportStyleManager class: Ivalid parameter values.");
         }
     }
 }
示例#2
0
 public static void DisposeInstance(string fileName, Stream stream)
 {
     if (ExportCustomProvider.IsValidFileName(fileName))
     {
         instances.Remove(fileName);
     }
     else
     {
         if (ExportCustomProvider.IsValidStream(stream))
         {
             instances2.Remove(stream);
         }
         else
         {
             throw new ExportCacheException("Can't dispose the instance of ExportStyleManager class: Ivalid parameter values.");
         }
     }
 }