コード例 #1
0
ファイル: Program.cs プロジェクト: hukuolin/DayDayCode
        static void TestCallWebService()
        {
            StudeyWebService sws     = new StudeyWebService();
            AssemblyExt      ass     = new AssemblyExt();
            string           xmlPath = ass.GetAssemblyPath() + @"\Content\StudentOutSendRegister.xml";

            sws.UploadFile(xmlPath);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: hukuolin/DayDayCode
        static void CallFSOPApi()
        {
            AssemblyExt      ass     = new AssemblyExt();
            string           xmlPath = ass.GetAssemblyPath() + @"\Content\StudentOutSendRegister.xml";
            StudeyWebService sws     = new StudeyWebService();

            sws.UploadFileToFSOP(xmlPath, "submitLegFlyFSOPXML", AppConfig.FSOPTocken);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: hukuolin/DayDayCode
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
ファイル: AppHelper.cs プロジェクト: hukuolin/DayDayCode
        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);
        }
コード例 #6
0
        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();
            }
            //如何根据接口实例化具体的实现类
        }
コード例 #7
0
        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();
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: hukuolin/DayDayCode
 static void VerifyXmlConvertObject()
 {
     string dir = new AssemblyExt().GetAppDir(AppStruct.WinApp) + @"\Content\AppStatue.xml";
     ApplyStatueWcfResponseXml response = dir.ReadXmlNodeContent <ApplyStatueWcfResponseXml>("application");
 }
コード例 #9
0
        public QuartzSchedule(AppStruct callClassOfAppType)
        {
            AssemblyExt ass = new AssemblyExt();

            dir = ass.GetAppDir(callClassOfAppType);
        }