예제 #1
0
        private async Task <Tuple <bool, WebResource> > GetWebResourceByAttribute(IOrganizationServiceExtented service, CommonConfiguration commonConfig, string webResourceName)
        {
            var repositoryWebResource = new WebResourceRepository(service);

            var webResource = await repositoryWebResource.FindByExactNameAsync(webResourceName, ColumnSetInstances.AllColumns);

            if (webResource == null)
            {
                this._iWriteToOutput.WriteToOutput(service.ConnectionData, Properties.OutputStrings.InConnectionWebResourceWasNotFoundFormat2, service.ConnectionData.Name, webResourceName);
                this._iWriteToOutput.ActivateOutputWindow(service.ConnectionData);

                WindowHelper.OpenWebResourceExplorer(_iWriteToOutput, service, commonConfig);
            }

            return(Tuple.Create(webResource != null, webResource));
        }