public Credential(DataSet.TitleRow title) { CredentialTableAdapter ta = new CredentialTableAdapter(); foreach (DataSet.CredentialRow row in ta.GetDataByTitleId(title.Id)) { if (row.Kind == ApnsPkcs12FilePathKind) { apnsPkcs12FilePath = row.Body; } else if (row.Kind == ApnsPkcs12FilePasswordKind) { apnsPkcs12FilePassword = row.Body; } else if (row.Kind == ApnsIsSandboxKind) { apnsIsSandbox = bool.Parse(row.Body); } else if (row.Kind == LvlRsaKeyValueKind) { lvlRsaKeyValue = row.Body; } else if (row.Kind == LvlPackageNameKind) { lvlPackageName = row.Body; } } }
public EditTitleForm(bool isNewTitle, ref DataSet.TitleRow sourceTitle, ref Credential sourceCredential) { this.sourceTitle = sourceTitle; this.sourceCredential = sourceCredential; this.isNewTitle = isNewTitle; InitializeComponent(); if (isNewTitle) { this.Text = "�V�����z�M�^�C�g��"; } else { this.Text = "�z�M�^�C�g����ҏW"; lvlPublikKeyTextBox.Text = LvlKeyNotModified; } titleNameTextBox.DataBindings.Add("Text", sourceTitle, "Name"); apnsFilePathTextBox.DataBindings.Add("Text", sourceCredential, "ApnsPkcs12FilePath"); apnsFilePasswordTextBox.DataBindings.Add("Text", sourceCredential, "ApnsPkcs12FilePassword"); apnsIsSandboxCheckBox.DataBindings.Add("Checked", sourceCredential, "ApnsIsSandbox"); lvlPackageNameTextBox.DataBindings.Add("Text", sourceCredential, "LvlPackageName"); sitePathTextBox.DataBindings.Add("Text", sourceTitle, "SiteRootPath"); standByPathTextBox.DataBindings.Add("Text", sourceTitle, "StandByPath"); defaultPushMessageTextBox.DataBindings.Add("Text", sourceTitle, "PushMessage"); }
public TokenVerifier(DataSet.TokenRow token, DateTime now) { this.now = now; if (token == null) { subscriber = null; return; } this.token = token; SubscriberTableAdapter sta = new SubscriberTableAdapter(); DataSet.SubscriberDataTable sdt = sta.GetDataById(token.SubscriberId); subscriber = sdt[0]; if (subscriber.TitleId != SiteConstant.Title.Id) { subscriber = null; } }
public TokenPublisher(DataSet.SubscriberRow subscriber, DateTime now) { this.subscriber = subscriber; this.now = now; }
private DataSet.SubscriberRow PrepareExist(DataSet.TitleRow title) { SubscriberTableAdapter sta = new SubscriberTableAdapter(); DataSet.SubscriberDataTable sdt = new DataSet.SubscriberDataTable(); sdt.AddSubscriberRow(title, "deadbeef", AuthScheme.iOS_APNs.ToString(), Constant.Ago); sta.Update(sdt); DataSet.SubscriberRow subscriber = sdt[0]; APNsTableAdapter ata = new APNsTableAdapter(); DataSet.APNsDataTable adt = new DataSet.APNsDataTable(); adt.AddAPNsRow(subscriber, "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", false, 0, false); ata.Update(adt); TokenTableAdapter tta = new TokenTableAdapter(); DataSet.TokenDataTable tdt = new DataSet.TokenDataTable(); tdt.AddTokenRow(subscriber, DateTime.Now - new TimeSpan(48, 0, 0), "deadbeef"); tta.Update(tdt); return subscriber; }
public static void TestSettings(DataSet.TitleRow title) { SiteConstant.title = title; SiteConstant.credential = new Credential(Title); }