static void TestCallWebService() { StudeyWebService sws = new StudeyWebService(); AssemblyExt ass = new AssemblyExt(); string xmlPath = ass.GetAssemblyPath() + @"\Content\StudentOutSendRegister.xml"; sws.UploadFile(xmlPath); }
static void CallFSOPApi() { AssemblyExt ass = new AssemblyExt(); string xmlPath = ass.GetAssemblyPath() + @"\Content\StudentOutSendRegister.xml"; StudeyWebService sws = new StudeyWebService(); sws.UploadFileToFSOP(xmlPath, "submitLegFlyFSOPXML", AppConfig.FSOPTocken); }
static void XmlTest() { AssemblyExt ass = new AssemblyExt(); string xmlPath = ass.GetAssemblyPath() + @"\Content\StudentOutSendRegister.xml"; AbroadStudentManage abroad = new AbroadStudentManage(); string xml = abroad.FillDataToXml(xmlPath); RemoteWcf.RemoteDataServiceClient rds = new RemoteWcf.RemoteDataServiceClient(); rds.UploadAbroadStudent(xml); }
public string UploadAbroadStudent(string xml) { string statue = string.Empty; string dir = new AssemblyExt().GetAppDir(AppStruct.Web) + "/" + ConfigurationManager.AppSettings["LogRelativeDir"]; string file = DateTime.Now.ToString("yyyyMMddHHmm") + ".log"; LoggerHeper log = new LoggerHeper(); log.WriteLog(xml, dir, file, false); return(statue); }
public static void WriteLog(string msg) { if (!AppConfig.OpenLogFun) { return; } AssemblyExt ass = new AssemblyExt(); string dir = ass.GetAppDir(AppStruct.Web); LoggerHeper log = new LoggerHeper(); log.WriteLog(msg, dir, DateTime.Now.ToString(AppConfig.DateTimeIntFormat) + ".log", true); }
public void ConvertService(Type interfaceType, DBType db) {//实例化的接口关系 实例化 name=I+name string name = interfaceType.Name; //程序集的位置 if (string.IsNullOrEmpty(AssemblyDir)) { AssemblyExt ext = new AssemblyExt(); AssemblyDir = ext.GetWebAssemblyPath(); } //如何根据接口实例化具体的实现类 }
public void Register() { this.container.RegisterInstance <IServiceLocator>(new UnityServiceLocator(this.container)); ServiceLocator.SetLocatorProvider(() => this.container.Resolve <IServiceLocator>()); IEnumerable <Type> allAttributesSubTypes = AssemblyExt.FindSubClassesOf <ServiceAttribute>(); allAttributesSubTypes = allAttributesSubTypes.Prepend(typeof(ServiceAttribute)); IEnumerable <Type> serviceAttributeAssemblies = this.assemblies.GetAssembliesTypes(allAttributesSubTypes); foreach (Type assembly in serviceAttributeAssemblies) { IEnumerable <Type> interfacesToBeRegsitered = GetInterfacesToBeRegistered(assembly); AddToInternalTypeMapping(assembly, interfacesToBeRegsitered); } this.RegisterConventions(); }
static void VerifyXmlConvertObject() { string dir = new AssemblyExt().GetAppDir(AppStruct.WinApp) + @"\Content\AppStatue.xml"; ApplyStatueWcfResponseXml response = dir.ReadXmlNodeContent <ApplyStatueWcfResponseXml>("application"); }
public QuartzSchedule(AppStruct callClassOfAppType) { AssemblyExt ass = new AssemblyExt(); dir = ass.GetAppDir(callClassOfAppType); }