/// <summary> /// Contained resource is either an embedded or linked resource. /// </summary> /// <param name="name">The resource name</param> /// <param name="transport">A transport to get the linked resource.</param> /// <returns></returns> public async Task <UcwaResource> GetContainedResource(string name, UcwaAppTransport transport) { UcwaResource res = null; if (this.EmbeddedResourceNames.Contains(name)) { res = this.GetEmbeddedResource(name); } else if (this.LinkNames.Contains(name) && transport != null) { var linkUri = this.GetLinkUri(name); var result = await transport.GetResourceAsync(linkUri); if (result.StatusCode != System.Net.HttpStatusCode.OK) { return(null); } res = result.Resource; } return(res); }
public UcwaAppEventChannel(string channelUri, UcwaAppTransport transport) { this.Transport = transport; this.url = channelUri; }
public UcwaApp(bool discoverFromInternalDomain = true) { Transport = new UcwaAppTransport(); this.IsSignedIn = false; this.discoverFromInternalDomain = discoverFromInternalDomain; }