src/BeatPulse.UI/Core/UIResourceExtensions.cs
/// <summary>
/// Returns embedded UI main html resource with target ApiPath configured for request polling
/// </summary>
/// <param name="resources"></param>
/// <param name="apiPath"></param>
/// <returns></returns>
Returns embedded UI main html resource with target ApiPath configured for request polling
Returns embedded UI main html resource with target ApiPath configured for request polling
public static UIResource GetMainUI(this IEnumerable<UIResource> resources, ApiOptions apiOptions)
        {
            var resource = resources.WithContentType(ContentType.HTML).FirstOrDefault(r => r.FileName == BeatPulseUIKeys.BEATPULSEUI_MAIN_UI_RESOURCE);
            resource.Content = resource.Content.Replace(BeatPulseUIKeys.BEATPULSEUI_MAIN_UI_API_TARGET, apiOptions.BeatPulseApiPath);
            resource.Content = resource.Content.Replace(BeatPulseUIKeys.BEATPULSEUI_WEBHOOKS_API_TARGET, apiOptions.BeatPulseWebHooksPath);
            resource.Content = resource.Content.Replace(BeatPulseUIKeys.BEATPULSEUI_MAIN_UI_RESOURCE_TARGET, apiOptions.BeatPulseResourcePath);
            return resource;
        }
public static UIResource GetMainUI ( this IEnumerable < UIResource > resources , ApiOptions apiOptions ) { var resource = resources . WithContentType ( ContentType . HTML ) . FirstOrDefault ( r => r . FileName == BeatPulseUIKeys . BEATPULSEUI_MAIN_UI_RESOURCE ) ; resource . Content = resource . Content . Replace ( BeatPulseUIKeys . BEATPULSEUI_MAIN_UI_API_TARGET , apiOptions . BeatPulseApiPath ) ; resource . Content = resource . Content . Replace ( BeatPulseUIKeys . BEATPULSEUI_WEBHOOKS_API_TARGET , apiOptions . BeatPulseWebHooksPath ) ; resource . Content = resource . Content . Replace ( BeatPulseUIKeys . BEATPULSEUI_MAIN_UI_RESOURCE_TARGET , apiOptions . BeatPulseResourcePath ) ; return resource ; }
Returns embedded UI main html resource with target ApiPath configured for request polling
Returns embedded UI main html resource with target ApiPath configured for request polling
None
IEnumerable<UIResource>
this
apiOptions
ApiOptions
resources
None
apiPath
None