/* * public void TransferContent() * { * string path = "/454830/modesto/Test/mobile-static/content2/"; * try * { * // Setup session options * SessionOptions sessionOptions = new SessionOptions * { * Protocol = Protocol.Sftp, * HostName = "ebizmicro.upload.akamai.com", * UserName = "******", * SshPrivateKeyPath = @"C:\workspace\cmsdeployer\.ssh\id_rsa_AkamaiDeploy.ppk", * // Password = "******", * SshHostKeyFingerprint = "ssh-dss-ee-33-bd-ac-7b-6e-bd-0b-60-6e-49-20-56-cb-00-d3" * }; * * using (Session session = new Session()) * { * session.FileTransferred += Session_FileTransferred; * // Connect * session.Open(sessionOptions); * * // Upload files * TransferOptions transferOptions = new TransferOptions(); * transferOptions.TransferMode = TransferMode.Binary; * * TransferOperationResult transferResult; * * transferResult = * session.PutFiles(@"C:\workspace\zTest\*", path, false, transferOptions); * * // Throw on any error * transferResult.Check(); * * // Print results * foreach (TransferEventArgs transfer in transferResult.Transfers) * { * Console.WriteLine("Upload of {0} succeeded", transfer.FileName); * } * * * } * * * } * catch (Exception e) * { * Console.WriteLine("Error: {0}", e); * * } * } * * private void Session_FileTransferred(object sender, TransferEventArgs e) * { * Console.WriteLine("Upload of {0} succeeded", e.FileName); * } * */ private void button2_Click(object sender, EventArgs e) { /* * * string proName= "coverageModule-learnMore-networkButton-networkButton2:The Network"; * * var mainObj = JsonStringPropParser.BuildObjects2(proName); * if (mainObj != null) * { * * * * var contentJson = JsonConvert.SerializeObject(mainObj, Formatting.Indented, new JsonSerializerSettings * { * NullValueHandling = NullValueHandling.Include, * ContractResolver = new CamelCasePropertyNamesContractResolver() * }); * * richTextBox1.AppendText("\n\n" + contentJson); * * } * * * * return;*/ //string landingId = "{30092F61-BC5F-47C2-8FB5-264A49692B9E}"; string landingId = "{891FB7E6-55FB-4F8A-9133-44C899BCF0EF}"; SitecoreItemService sitecoreItemService = new SitecoreItemService("http://local.comcast.com/sitecore/api/ssc/item/", "master"); string payload = sitecoreItemService.LoadContent(landingId); richTextBox1.AppendText("\n\n...........................\n" + payload + "\n"); /* string landingId = "{891FB7E6-55FB-4F8A-9133-44C899BCF0EF}"; * // * dynamic landingPageInput = GetValues<ExpandoObject>(landingId); * var landingPage = BuildObject(landingPageInput); * * var landingPageJson = JsonConvert.SerializeObject(landingPage, Formatting.Indented, new JsonSerializerSettings * { * NullValueHandling = NullValueHandling.Ignore, * ContractResolver = new CamelCasePropertyNamesContractResolver() * }); * * */ }
public NavigationRepository(BlazorContext blazorContext, SitecoreItemService sitecoreItemService) { _blazorContext = blazorContext; _sitecoreItemService = sitecoreItemService; }
public NavigationRepository(BlazorContext blazorContext, SitecoreItemService sitecoreItemService, BlazorStateMachine blazorStateMachine) { _blazorContext = blazorContext; _sitecoreItemService = sitecoreItemService; _blazorStateMachine = blazorStateMachine; }