/// <summary> /// 获取下一个广告并播放 /// </summary> /// <param name="_AdPlayType"></param> void ShowAdHandler(AdPlayType _AdPlayType) { IAD nextAd = adSdkList[nextAdSdk].Ad; AllSDKManager.GetSDK <AllAnalyticsSdk>().Event_Ad_Start(nextAd.Name, _AdPlayType, false); switch (_AdPlayType) { case AdPlayType.Banner: nextAd.ShowBanner(); break; case AdPlayType.Interstitial: Debug.Log("ShowAdHandler Interstitial ==test==插页播放成功: timeScale=" + Time.timeScale); nextAd.ShowInterstitial(); break; case AdPlayType.RewardedVideo: Debug.Log("ShowAdHandler ShowRewardedVideo ==test==插页播放成功: timeScale=" + Time.timeScale); nextAd.ShowRewardedVideo(); break; default: break; } }
public void GenerateProcedureEntry(ProcedureList patientProcedure, int refid, PatientClinicalInformation patientinfo, III hl7III, Factory hl7factory) { IEntry Entry = functionalStatus.Section.Entry.Append(); Entry.AsObservation.MoodCode = x_ActMoodDocumentObservation.EVN; Entry.AsObservation.ClassCode = "OBS"; hl7III = Entry.AsObservation.TemplateId.Append(); hl7III.Init("2.16.840.1.113883.10.20.22.4.13"); hl7III = Entry.AsObservation.Id.Append(); hl7III.Init(Guid.NewGuid().ToString()); Entry.AsObservation.Code.Code = patientProcedure.CPTCodes; Entry.AsObservation.Code.CodeSystem = "2.16.840.1.113883.6.96"; Entry.AsObservation.Code.CodeSystemName = "CPT"; Entry.AsObservation.Code.DisplayName = patientProcedure.Description; Entry.AsObservation.Code.OriginalText.Reference.Value = ("#Proc" + (refid + 1).ToString()); Entry.AsObservation.StatusCode.Code = "completed"; Entry.AsObservation.EffectiveTime.NullFlavor = "UNK"; Entry.AsObservation.PriorityCode.NullFlavor = "UNK"; CD obsValueAsCD = new CD(); obsValueAsCD.OriginalText.Reference.Value = ("#Proc" + (refid + 1).ToString()); Entry.AsObservation.Value.Add(obsValueAsCD); if (patientinfo.ptClinicInformation.ClinicName != null) { addressphno = new GenerateAddressPhNo(); addressinfo = new AddressModel();///Fill Clinic Address addressinfo.street = patientinfo.ptClinicInformation.ClinicStreeet; addressinfo.city = patientinfo.ptClinicInformation.ClinicCity; addressinfo.state = patientinfo.ptClinicInformation.ClinicState; addressinfo.country = patientinfo.ptClinicInformation.ClinicCountry; addressinfo.pinCode = patientinfo.ptClinicInformation.ClinicZip.ToString(); contactinfo = new PhNoModel();///FIll Clinic Contact Number contactinfo.telcomUse = "WP"; contactinfo.telcomValue = patientinfo.ptClinicInformation.ClinicPhoneNumber; contactinfo.nullFlavor = "UNK"; } var Performer = Entry.AsObservation.Performer.Append(); hl7III = Performer.AssignedEntity.Id.Append(); hl7III.Init(Guid.NewGuid().ToString()); Performer.AssignedEntity.Addr.Add(addressphno.GenerateAddress(addressinfo, hl7factory)); Performer.AssignedEntity.Telecom.Add(addressphno.GeneratePhNo(contactinfo, hl7factory)); hl7III = Performer.AssignedEntity.RepresentedOrganization.Id.Append(); hl7III.Init(Guid.NewGuid().ToString()); IAD hl7IADInterface = hl7factory.CreateAD(); hl7IADInterface.NullFlavor = "UNK"; Performer.AssignedEntity.RepresentedOrganization.Addr.Add(hl7IADInterface); ITEL telcom = hl7factory.CreateTEL(); telcom = hl7factory.CreateTEL(); telcom.NullFlavor = "UNK"; Performer.AssignedEntity.RepresentedOrganization.Telecom.Add(telcom); }
public AD() { //初始化ASP.NET内置对象 Response = System.Web.HttpContext.Current.Response; Request = System.Web.HttpContext.Current.Request; Server = System.Web.HttpContext.Current.Server; Session = System.Web.HttpContext.Current.Session; Application = System.Web.HttpContext.Current.Application; DBHelper = SQLHelperFactory.CreateSQLHelper(); tools = ToolsFactory.CreateTools(); MyAD = ADFactory.CreateAD(); Mychannel = AD_Position_ChannelFactory.CreateAD_Position_Channel(); Myposition = ADPositionFactory.CreateADPosition(); supplier = new Supplier(); }
void RegistAdSdk(Type _type, IAD _iAd, AdType _adType = AdType.Third) { if (!adSdkDic.ContainsKey(_type)) { AdData adData = new AdData(); adData.type = _type; adData.Ad = _iAd; adData.adType = _adType; adSdkDic.Add(_type, adData); if (_adType == AdType.Third) { adSdkList.Add(adData); } AllSDKManager.SDKDebug(Name + "/" + adSdkDic[_type].Ad.Name + "注册成功"); } else { AllSDKManager.SDKDebug(Name + " 已经注册过这个平台" + adSdkDic[_type].Ad.Name); } }
public IAD GenerateAddress(AddressModel addressinfo, Factory hl7factory) { IAD hl7IADInterface = hl7factory.CreateAD(); if (addressinfo.street != "" && addressinfo.street != null) { var Street = hl7factory.CreateadxpstreetAddressLine(); Street.Init(addressinfo.street); hl7IADInterface.Items.Add(Street); } if (addressinfo.city != "" && addressinfo.city != null) { var City = hl7factory.Createadxpcity(); City.Init(addressinfo.city); hl7IADInterface.Items.Add(City); } if (addressinfo.state != "" && addressinfo.state != null) { var State = hl7factory.Createadxpstate(); State.Init(addressinfo.state); hl7IADInterface.Items.Add(State); } if (addressinfo.country != "" && addressinfo.country != null) { var Country = hl7factory.Createadxpcountry(); Country.Init(addressinfo.country); hl7IADInterface.Items.Add(Country); } var PostalCode = hl7factory.CreateadxppostalCode(); if (addressinfo.pinCode != "" && addressinfo.pinCode != null) { PostalCode.Init(addressinfo.pinCode); } else { PostalCode.NullFlavor = addressinfo.nullFlavor; } hl7IADInterface.Items.Add(PostalCode); return(hl7IADInterface); }
//////////////////////////////////////////////////////////////// // 生命周期接口 ILifeCycle //////////////////////////////////////////////////////////////// public void OnInit() { // load all sdk if (!m_isInitialized) { m_isInitialized = true; // 日志记录模块 var debugLogSDK = new DebugLogSDK(); m_SDKList.Add(debugLogSDK); this.m_ProxyDebugLog = debugLogSDK; // 广告模块 #if (UNITY_ANDROID || UNITY_IPHONE || UNITY_IOS) && !UNITY_EDITOR var ironSourceSDK = new IronSourceSDK(); m_SDKList.Add(ironSourceSDK); m_ProxyAD = ironSourceSDK; #else var adSimulatorSDK = new ADSimulatorSDK(); m_SDKList.Add(adSimulatorSDK); m_ProxyAD = adSimulatorSDK; #endif #if (UNITY_IPHONE || UNITY_IOS) && !UNITY_EDITOR // iOS GameCenter SDK var _iOSGameCenter = new iOSGameCenter(); m_SDKList.Add(_iOSGameCenter); this.m_ProxyGameCenter = _iOSGameCenter; #elif UNITY_ANDROID && !UNITY_EDITOR // android GameCenter SDK var _androidGameCenter = new AndroidGameCenter(); m_SDKList.Add(_androidGameCenter); this.m_ProxyGameCenter = _androidGameCenter; #else // simulator GameCenter SDK var _simulatorGameCenter = new SimulatorGameCenter(); m_SDKList.Add(_simulatorGameCenter); this.m_ProxyGameCenter = _simulatorGameCenter; #endif // IAP var iapSDK = new IAPSDK(); m_SDKList.Add(iapSDK); this.m_ProxyIAP = iapSDK; // IAnalytics #if (UNITY_IPHONE || UNITY_IOS) && !UNITY_EDITOR // AppsFlyer SDK var appsFlyerValue = Config.ID.GetValue("AppsFlyerKey"); if (!(appsFlyerValue == null || appsFlyerValue == "")) { var appsFlyerAnalyticsSDK = new AppsFlyerAnalyticsSDK(); m_SDKList.Add(appsFlyerAnalyticsSDK); m_AnalyticList.Add(appsFlyerAnalyticsSDK); } #endif // 推送 #if (UNITY_IPHONE || UNITY_IOS) && !UNITY_EDITOR var pushSDK = new iOSPush(); m_SDKList.Add(pushSDK); m_ProxyPush = pushSDK; #endif m_SDKList.ForEach(sdk => { sdk.OnInit(); }); } }
public int Run(string[] args) { const char splitter = '='; Dictionary <string, string> paramDictionary = new Dictionary <string, string>(); IParameterParser IPP = ActiveDirectoryFactory.GetParameterParserInterface(); paramDictionary = IPP.ParseParameters(args, splitter); bool domainFlag = false; string domainString = string.Empty; bool userFlag = false; string userString = string.Empty; bool groupFlag = false; string groupString = string.Empty; bool passwordFlag = false; string passwordString = string.Empty; foreach (KeyValuePair <string, string> keyValuePair in paramDictionary) { switch (keyValuePair.Key) { case "-h": IHelper IH = ActiveDirectoryFactory.GetHelperDirectoryInterface(); Console.WriteLine("Help:"); IH.DisplayHelp(); return(0); break; case "-d": domainString = keyValuePair.Value; if (domainString == string.Empty) { Console.WriteLine("Connection string for -d parameter can not be empty!"); return(1); } domainFlag = true; break; case "-u": userString = keyValuePair.Value; if (userString == string.Empty) { Console.WriteLine("User string for -u parameter can not be empty!"); return(1); } userFlag = true; break; case "-g": groupString = keyValuePair.Value; if (groupString == string.Empty) { Console.WriteLine("Group string for -g parameter can not be empty!"); return(1); } groupFlag = true; break; case "-p": passwordString = keyValuePair.Value; if (passwordString == string.Empty) { Console.WriteLine("Password string for -p parameter can not be empty!"); return(1); } passwordFlag = true; break; default: Console.WriteLine("Wrong parameters insertion."); return(1); break; } } if ((groupFlag == true) && (userFlag == false)) { Console.WriteLine("User was not specified! Use -g with combination of -u ."); return(1); } if ((passwordFlag == true) && (userFlag == false)) { Console.WriteLine("User was not specified! Use -p with combination of -u ."); return(1); } if ((groupFlag == true) && (passwordFlag == true)) { Console.WriteLine("Wrong parameter combination, -g and -p can't be used together, exiting!"); return(1); } IActiveDirectory IAD; IHelper iHelper = ActiveDirectoryFactory.GetHelperDirectoryInterface(); if (domainFlag == true) { // Use external domain. IAD = ActiveDirectoryFactory.GetActiveDirectoryInterface(domainString); } else { // Use current domain. IAD = ActiveDirectoryFactory.GetActiveDirectoryInterface(); } if (userFlag == true) { if (groupFlag == true) { // Prcoess -u + -g paramter compbination. if (IAD.IsUserWithinGroup(userString, groupString) == true) { Console.WriteLine("true"); } else { Console.WriteLine("false"); } } else if (passwordFlag == true) { // Prcoess -u + -p paramter compbination. if (IAD.IsUsersPassword(userString, passwordString) == true) { Console.WriteLine("true"); } else { Console.WriteLine("false"); } } else { // Process -u parameter only. string domainName = IAD.ReturnDomainName(); ArrayList allOfGroups = new ArrayList(); allOfGroups = IAD.GetUsersGroups(userString); if (allOfGroups.Count == 0) { Console.WriteLine("No groups found for user \"{0}\" within {1} .", userString, domainName); } else { Console.WriteLine("User \"{0}\", within " + domainName + ", is member of the following groups:\n", userString); iHelper.PrintArrayListsContent(allOfGroups); } } } return(0); // Run function end. All is OK. }