public PnpFile ToPnpFile() { var returnValue = new PnpFile() { Id = Id, Filename = file.FileName, PnpTemplate = ToPnpProvisioningTemplate() }; return(returnValue); }
public async Task Delete(PnpFile pnpFile) { var client = await GetDocumentDbClient(); var pnpFileToDelete = client.CreateDocumentQuery <Document>(DocumentCollection.DocumentsLink).Where(d => d.Id == pnpFile.Id.ToString()).AsEnumerable().FirstOrDefault(); if (pnpFileToDelete != null) { await client.DeleteDocumentAsync(pnpFileToDelete.SelfLink); } }
public void DisplayPnP() { if (Canvas != null) { PnpFile input = new PnpFile(PnpPath); foreach (PnpComponent component in input.Components) { if (component.Package == "\"0603\"") { Canvas.PartCrosshair(component.X, component.Y, Scale); } } } }
public async Task Insert(PnpFile pnpFile) { try { var client = await GetDocumentDbClient(); var document = client.CreateDocumentQuery("dbs/" + DocumentDbId + "/colls/" + _collectionId).Where(d => d.Id == pnpFile.Id.ToString()).AsEnumerable().FirstOrDefault(); if (document == null) { client.CreateDocumentAsync("dbs/" + DocumentDbId + "/colls/" + _collectionId, pnpFile).Wait(); } } catch (Exception exception) { var t = exception; throw; } }
public SiteTemplateViewModel(PnpFile pnpModel) { //PnpProvisioningTemplate = pnpModel.PnpTemplate; UsesDefaultTemplateFiles = true; //todo: make it changeable }
public async Task Delete(PnpFile pnpFile) { await _pnpFileRepository.Delete(pnpFile); }
public async Task Update(PnpFile newPnpFile, PnpFile oldPnpFile) { await _pnpFileRepository.Update(newPnpFile, oldPnpFile); }
public async Task Insert(PnpFile pnpFile) { await _pnpFileRepository.Insert(pnpFile); }
public async Task Update(PnpFile oldPnpFile, PnpFile newPnpFile) { await Delete(oldPnpFile); await Insert(newPnpFile); }