/// <summary>Snippet for CreateApplication</summary> public void CreateApplicationResourceNames() { // Snippet: CreateApplication(ProfileName, Application, CallSettings) // Create client ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create(); // Initialize request argument(s) ProfileName parent = ProfileName.FromProjectTenantProfile("[PROJECT]", "[TENANT]", "[PROFILE]"); Application application = new Application(); // Make the request Application response = applicationServiceClient.CreateApplication(parent, application); // End snippet }
/// <summary>Snippet for CreateApplication</summary> public void CreateApplication() { // Snippet: CreateApplication(string, Application, CallSettings) // Create client ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/tenants/[TENANT]/profiles/[PROFILE]"; Application application = new Application(); // Make the request Application response = applicationServiceClient.CreateApplication(parent, application); // End snippet }
/// <summary>Snippet for CreateApplication</summary> public void CreateApplicationRequestObject() { // Snippet: CreateApplication(CreateApplicationRequest, CallSettings) // Create client ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create(); // Initialize request argument(s) CreateApplicationRequest request = new CreateApplicationRequest { ParentAsProfileName = ProfileName.FromProjectTenantProfile("[PROJECT]", "[TENANT]", "[PROFILE]"), Application = new Application(), }; // Make the request Application response = applicationServiceClient.CreateApplication(request); // End snippet }
public bool PostApplication(ApplicationDAO app) { ApplicationServiceClient client = new ApplicationServiceClient(); try { bool result = false; // are we editing or creating this item? if (app.ApplicationID > 0) result = client.UpdateApplication(app); else result = client.CreateApplication(app); return result; } catch (FaultException<KaskServiceException> e) { throw new HttpException(e.Message); } }