private static InstCreatorFactory GetInst()
 {
     if (factory == null)
     {
         factory = new InstCreatorFactory();
     }
     return factory;
 }
Beispiel #2
0
 private static InstCreatorFactory GetInst()
 {
     if (factory == null)
     {
         factory = new InstCreatorFactory();
     }
     return(factory);
 }
Beispiel #3
0
 public object Create(object parent, object configContext, System.Xml.XmlNode section)
 {
     using (MemoryStream ms = new MemoryStream())
     {
         using (StreamWriter sw = new StreamWriter(ms))
         {
             sw.Write(section.OuterXml);
             var reader = InstCreatorFactory.GetReader(Ctrip.SOA.Infratructure.IOCFactoryModel.Enum.FactoryMappingFilePattern.Unity);
             sw.Flush();
             ms.Position = 0;
             return(reader.GetMappingContexts(ms));
         }
     }
 }
Beispiel #4
0
 public static IRegistContextReader GetReader(FactoryMappingFilePattern pattern)
 {
     return(InstCreatorFactory.GetInst()._GetReader(pattern));
 }