Exemplo n.º 1
0
 private static InstCreatorFactory GetInst()
 {
     if (factory == null)
     {
         factory = new InstCreatorFactory();
     }
     return factory;
 }
Exemplo n.º 2
0
 private static InstCreatorFactory GetInst()
 {
     if (factory == null)
     {
         factory = new InstCreatorFactory();
     }
     return(factory);
 }
Exemplo n.º 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));
         }
     }
 }
Exemplo n.º 4
0
 public static IRegistContextReader GetReader(FactoryMappingFilePattern pattern)
 {
     return(InstCreatorFactory.GetInst()._GetReader(pattern));
 }