diff --git a/ChangeLog.md b/ChangeLog.md index 245a867..f04a14c 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -12,6 +12,20 @@ All notable changes to the "cds-for-code" extension will be documented in this f ## v0.8 Early Preview - December 2019 - January 2020 +### v0.8.13 (February 21, 2020) + +- Feature: Code Generation: Fix button styling on UX ([#649](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/649/)) +- Feature: Icons: Proper icon resolution with iconify for UX ([#650](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/650/)) +- Feature: Confirm delete of plugin steps and plugin step images ([#655](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/655/)) +- Feature: Plugin step and step image dialog should refresh treeview on exit ([#656](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/656/)) +- Bugfix: Webviews showing templating tokens in content ([#645](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/645/)) +- Bugfix: Code generation emits invalid names in option sets ([#646](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/646/)) +- Bugfix: Cloned objects stopped respecting excluded properties ([#652](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/652/)) +- Bugfix: Error when generation code missing entity on attribute filter ([#653](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/653/)) +- Bugfix: Code generation doesn't black list attributes on white listed entity ([#654](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/654/)) +- Bugfix: Passwords containing certain characters rejected during code generation ([#657](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/657/)) +- Bugfix: Code generation not emitting getter and setter on some properties ([#658](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/658/)) + ### v0.8.12 (February 13, 2020) - Bugfix: Users received "Authentication for this request failed." error when accessing non-US environments (reported on GitHub) ([GitHub Issue #10](https://github.com/cloudsmithconsulting/cds-for-code/issues/10) | [#636](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/636/)) diff --git a/README.md b/README.md index 8a04b02..62903d5 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This extension is designed to help developers with a simple development loop for |Version|Link|| |:--|:--|:--| -|Release Version:|[0.8.12](https://github.com/cloudsmithconsulting/cds-for-code/releases/tag/v0.8.12)|![Marketplace: Version](https://flat.badgen.net/vs-marketplace/v/cloudsmithconsulting.cds-for-code) ![Marketplace: Installs](https://flat.badgen.net/vs-marketplace/i/cloudsmithconsulting.cds-for-code) ![Marketplace: Downloads](https://flat.badgen.net/vs-marketplace/d/cloudsmithconsulting.cds-for-code) ![Marketplace: Rating](https://flat.badgen.net/vs-marketplace/rating/cloudsmithconsulting.cds-for-code) ![Open Issues](https://flat.badgen.net/github/open-issues/cloudsmithconsulting/cds-for-code) ![Stars](https://flat.badgen.net/github/stars/cloudsmithconsulting/cds-for-code)| +|Release Version:|[0.8.13](https://github.com/cloudsmithconsulting/cds-for-code/releases/tag/v0.8.13)|![Marketplace: Version](https://flat.badgen.net/vs-marketplace/v/cloudsmithconsulting.cds-for-code) ![Marketplace: Installs](https://flat.badgen.net/vs-marketplace/i/cloudsmithconsulting.cds-for-code) ![Marketplace: Downloads](https://flat.badgen.net/vs-marketplace/d/cloudsmithconsulting.cds-for-code) ![Marketplace: Rating](https://flat.badgen.net/vs-marketplace/rating/cloudsmithconsulting.cds-for-code) ![Open Issues](https://flat.badgen.net/github/open-issues/cloudsmithconsulting/cds-for-code) ![Stars](https://flat.badgen.net/github/stars/cloudsmithconsulting/cds-for-code)| |Development Version:|[0.9.0](https://github.com/cloudsmithconsulting/cds-for-code/releases/tag/v0.9.0)|[![Board Status](https://dev.azure.com/cloudsmith-consulting/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/b63fc4c8-773b-4ffc-ac61-c71890277c2c/_apis/work/boardbadge/350decde-59a7-49b4-a6f6-ee220fa7e391)](https://dev.azure.com/cloudsmith-consulting/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/_boards/board/t/b63fc4c8-773b-4ffc-ac61-c71890277c2c/Microsoft.RequirementCategory/) [![Build Status](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_apis/build/status/cds-for-code?branchName=master)](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_build/latest?definitionId=2&branchName=master) [![Release Status](https://vsrm.dev.azure.com/cloudsmith-consulting/_apis/public/Release/badge/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/1/2)](https://vsrm.dev.azure.com/cloudsmith-consulting/_apis/public/Release/badge/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/1/2)| --- @@ -21,10 +21,8 @@ This extension is designed to help developers with a simple development loop for - [Features](#features) - [Commands](#commands) - [Commands and Descriptions](#commands-and-descriptions) - - [These commands can be executed directly through the VSCode command palette](#these-commands-can-be-executed-directly-through-the-vscode-command-palette) - [Settings](#settings) - [Settings and Descriptions](#settings-and-descriptions) - - [These settings are editable inside the VSCode Settings Editor](#these-settings-are-editable-inside-the-vscode-settings-editor) - [Known Issues](#known-issues) - [Change Log](#change-log) - [Contributors](#contributors) diff --git a/docs/extension/Contributors.md b/docs/extension/Contributors.md index f3ee2de..a52560f 100644 --- a/docs/extension/Contributors.md +++ b/docs/extension/Contributors.md @@ -20,6 +20,7 @@ feedback, spot bugs and log issues so that we could deliver a better quality exp - Brandon Kelly - Ira Mellor +- Scott Farriss - Gregory Moncayo - Jonas Rapp - Nikita Polyakov diff --git a/docs/extension/api/classes/_components_solutions_webresourcemanager_.webresourcemanager.md b/docs/extension/api/classes/_components_solutions_webresourcemanager_.webresourcemanager.md index 88abb65..76d78f0 100644 --- a/docs/extension/api/classes/_components_solutions_webresourcemanager_.webresourcemanager.md +++ b/docs/extension/api/classes/_components_solutions_webresourcemanager_.webresourcemanager.md @@ -32,7 +32,7 @@ sidebar_label: "WebResourceManager" ▸ **compareWebResource**(`defaultUri?`: Uri): *Promise‹void›* -Defined in src/components/Solutions/WebResourceManager.ts:50 +Defined in src/components/Solutions/WebResourceManager.ts:54 **Parameters:** @@ -48,7 +48,7 @@ ___ ▸ **createWebResource**(`config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `solutionId?`: string, `webResource?`: any, `fileUri?`: Uri, `defaultName`: string, `inform`: boolean): *Promise‹any›* -Defined in src/components/Solutions/WebResourceManager.ts:45 +Defined in src/components/Solutions/WebResourceManager.ts:49 **Parameters:** @@ -69,7 +69,7 @@ ___ ▸ **getSolutionMapping**(`fsPath?`: string, `orgId?`: string, `solutionId?`: string): *Promise‹[SolutionWorkspaceMapping](_components_solutions_solutionworkspacemapping_.solutionworkspacemapping.md)›* -Defined in src/components/Solutions/WebResourceManager.ts:64 +Defined in src/components/Solutions/WebResourceManager.ts:68 **Parameters:** @@ -87,7 +87,7 @@ ___ ▸ **getWebResourceDetails**(`fsPath`: string | undefined): *Promise‹any›* -Defined in src/components/Solutions/WebResourceManager.ts:90 +Defined in src/components/Solutions/WebResourceManager.ts:94 **Parameters:** @@ -103,7 +103,7 @@ ___ ▸ **getWebResourceType**(`extension`: string): *number | undefined* -Defined in src/components/Solutions/WebResourceManager.ts:77 +Defined in src/components/Solutions/WebResourceManager.ts:81 **Parameters:** @@ -119,7 +119,7 @@ ___ ▸ **packWebResource**(`config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `solution?`: any, `webResource?`: any, `fileUri?`: Uri, `inform`: boolean): *Promise‹void›* -Defined in src/components/Solutions/WebResourceManager.ts:55 +Defined in src/components/Solutions/WebResourceManager.ts:59 **Parameters:** @@ -139,7 +139,7 @@ ___ ▸ **unpackWebResource**(`config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `webResource?`: any, `fileUri?`: Uri, `autoOpen`: boolean): *Promise‹void›* -Defined in src/components/Solutions/WebResourceManager.ts:60 +Defined in src/components/Solutions/WebResourceManager.ts:64 **Parameters:** @@ -158,7 +158,7 @@ ___ ▸ **upsertWebResource**(`config`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `webResource`: any, `solution?`: any): *Promise‹any›* -Defined in src/components/Solutions/WebResourceManager.ts:118 +Defined in src/components/Solutions/WebResourceManager.ts:122 **Parameters:** @@ -176,7 +176,7 @@ ___ ▸ **writeDataXmlFile**(`map`: [SolutionWorkspaceMapping](_components_solutions_solutionworkspacemapping_.solutionworkspacemapping.md), `webResource`: any, `fsPath`: string, `updateCustomizationsFile`: boolean): *Promise‹void›* -Defined in src/components/Solutions/WebResourceManager.ts:140 +Defined in src/components/Solutions/WebResourceManager.ts:144 **Parameters:** @@ -211,7 +211,7 @@ ___ ▸ **packWebResourceFromUri**(`uri?`: Uri): *Promise‹any›* -Defined in src/components/Solutions/WebResourceManager.ts:36 +Defined in src/components/Solutions/WebResourceManager.ts:38 **Parameters:** diff --git a/docs/extension/api/classes/_core_utilities_.utilities.md b/docs/extension/api/classes/_core_utilities_.utilities.md index 307e23f..abb4c3d 100644 --- a/docs/extension/api/classes/_core_utilities_.utilities.md +++ b/docs/extension/api/classes/_core_utilities_.utilities.md @@ -28,7 +28,7 @@ sidebar_label: "Utilities" • **get $Object**(): *[ObjectUtility](../interfaces/_core_utilities_.objectutility.md)* -Defined in src/core/Utilities.ts:75 +Defined in src/core/Utilities.ts:76 **Returns:** *[ObjectUtility](../interfaces/_core_utilities_.objectutility.md)* @@ -38,7 +38,7 @@ ___ • **get Async**(): *[AsyncUtility](../interfaces/_core_utilities_.asyncutility.md)* -Defined in src/core/Utilities.ts:71 +Defined in src/core/Utilities.ts:72 **Returns:** *[AsyncUtility](../interfaces/_core_utilities_.asyncutility.md)* @@ -48,7 +48,7 @@ ___ • **get Browser**(): *[BrowserUtility](../interfaces/_core_utilities_.browserutility.md)* -Defined in src/core/Utilities.ts:72 +Defined in src/core/Utilities.ts:73 **Returns:** *[BrowserUtility](../interfaces/_core_utilities_.browserutility.md)* @@ -58,7 +58,7 @@ ___ • **get Encoding**(): *[EncodingUtility](../interfaces/_core_utilities_.encodingutility.md)* -Defined in src/core/Utilities.ts:73 +Defined in src/core/Utilities.ts:74 **Returns:** *[EncodingUtility](../interfaces/_core_utilities_.encodingutility.md)* @@ -68,7 +68,7 @@ ___ • **get Guid**(): *[GuidUtility](../interfaces/_core_utilities_.guidutility.md)* -Defined in src/core/Utilities.ts:74 +Defined in src/core/Utilities.ts:75 **Returns:** *[GuidUtility](../interfaces/_core_utilities_.guidutility.md)* @@ -78,7 +78,7 @@ ___ • **get Random**(): *[RandomUtility](../interfaces/_core_utilities_.randomutility.md)* -Defined in src/core/Utilities.ts:76 +Defined in src/core/Utilities.ts:77 **Returns:** *[RandomUtility](../interfaces/_core_utilities_.randomutility.md)* @@ -88,6 +88,6 @@ ___ • **get String**(): *[StringUtility](../interfaces/_core_utilities_.stringutility.md)* -Defined in src/core/Utilities.ts:77 +Defined in src/core/Utilities.ts:78 **Returns:** *[StringUtility](../interfaces/_core_utilities_.stringutility.md)* diff --git a/docs/extension/api/classes/_core_webui_viewrenderer_.viewrenderer.md b/docs/extension/api/classes/_core_webui_viewrenderer_.viewrenderer.md index 47ba18a..686a796 100644 --- a/docs/extension/api/classes/_core_webui_viewrenderer_.viewrenderer.md +++ b/docs/extension/api/classes/_core_webui_viewrenderer_.viewrenderer.md @@ -271,15 +271,15 @@ ___ ### render -▸ **render**(`htmlParial`: string, `useCsp?`: boolean): *string* +▸ **render**(`htmlPartial`: string, `useCsp?`: boolean): *string* -Defined in src/core/webui/ViewRenderer.ts:96 +Defined in src/core/webui/ViewRenderer.ts:98 **Parameters:** Name | Type | ------ | ------ | -`htmlParial` | string | +`htmlPartial` | string | `useCsp?` | boolean | **Returns:** *string* diff --git a/docs/extension/api/classes/_views_cs_cds_viewcontainers_cdsexplorer_.cdsexplorer.md b/docs/extension/api/classes/_views_cs_cds_viewcontainers_cdsexplorer_.cdsexplorer.md index 36e42dd..7a7eebb 100644 --- a/docs/extension/api/classes/_views_cs_cds_viewcontainers_cdsexplorer_.cdsexplorer.md +++ b/docs/extension/api/classes/_views_cs_cds_viewcontainers_cdsexplorer_.cdsexplorer.md @@ -231,8 +231,8 @@ ___ Utilities.Browser.openWindow(CdsUrlResolver.getManageWebResourceUri(item.config, undefined, item.solutionId)); } }}, - { key: "PluginType", value: async (item) => await vscode.commands.executeCommand(cs.cds.controls.pluginStep.open, item.context._pluginassemblyid_value, item.config, undefined) }, - { key: "PluginStep", value: async (item) => await vscode.commands.executeCommand(cs.cds.controls.pluginStepImage.open, item.context.sdkmessageprocessingstepid, undefined, item.config) } + { key: "PluginType", value: async (item) => await vscode.commands.executeCommand(cs.cds.controls.pluginStep.open, item.context._pluginassemblyid_value, undefined, item.config, item) }, + { key: "PluginStep", value: async (item) => await vscode.commands.executeCommand(cs.cds.controls.pluginStepImage.open, item.context.sdkmessageprocessingstepid, undefined, item.config, item) } ]) Defined in src/views/cs.cds.viewContainers.cdsExplorer.ts:60 @@ -278,8 +278,8 @@ ___ Utilities.Browser.openWindow(CdsUrlResolver.getManageWebResourceUri(item.config, item.context.webresourceid, item.solutionId)); } }}, - { key: "PluginStep", value: async (item) => await vscode.commands.executeCommand(cs.cds.controls.pluginStep.open, item.context.eventhandler_plugintype._pluginassemblyid_value, item.config, item.context) }, - { key: "PluginStepImage", value: async (item) => await vscode.commands.executeCommand(cs.cds.controls.pluginStepImage.open, item.context._sdkmessageprocessingstepid_value, item.context, item.config) } + { key: "PluginStep", value: async (item) => await vscode.commands.executeCommand(cs.cds.controls.pluginStep.open, item.context.eventhandler_plugintype._pluginassemblyid_value, item.context, item.config, item) }, + { key: "PluginStepImage", value: async (item) => await vscode.commands.executeCommand(cs.cds.controls.pluginStepImage.open, item.context._sdkmessageprocessingstepid_value, item.context, item.config, item) } ]) Defined in src/views/cs.cds.viewContainers.cdsExplorer.ts:111 diff --git a/docs/extension/api/classes/_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md b/docs/extension/api/classes/_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md index e46f73e..c7dab00 100644 --- a/docs/extension/api/classes/_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md +++ b/docs/extension/api/classes/_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md @@ -22,11 +22,13 @@ sidebar_label: "PluginStepEditor" * [config](_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md#private-config) * [disposables](_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md#protected-disposables) +* [edit](_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md#private-edit) * [onDidClose](_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md#ondidclose) * [onDidReceiveMessage](_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md#ondidreceivemessage) * [onReady](_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md#onready) * [options](_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md#options) * [renderer](_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md#protected-renderer) +* [treeEntry](_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md#private-treeentry) * [openViews](_views_cs_cds_views_pluginstepeditor_.pluginstepeditor.md#static-openviews) ### Accessors @@ -70,7 +72,7 @@ Name | Type | • **config**: *[Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md)* -Defined in src/views/cs.cds.views.pluginStepEditor.ts:25 +Defined in src/views/cs.cds.views.pluginStepEditor.ts:26 ___ @@ -84,6 +86,14 @@ Defined in src/core/webui/View.ts:91 ___ +### `Private` edit + +• **edit**: *boolean* = false + +Defined in src/views/cs.cds.views.pluginStepEditor.ts:28 + +___ + ### onDidClose • **onDidClose**: *Event‹[View](_core_webui_view_.view.md)›* = this._onDidClose.event @@ -134,6 +144,14 @@ Defined in src/core/webui/View.ts:92 ___ +### `Private` treeEntry + +• **treeEntry**: *[CdsTreeEntry](_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md)* + +Defined in src/views/cs.cds.views.pluginStepEditor.ts:27 + +___ + ### `Static` openViews ▪ **openViews**: *object* @@ -156,7 +174,7 @@ Track the currently panel. Only allow a single panel to exist at a time. *Overrides [View](_core_webui_view_.view.md).[commands](_core_webui_view_.view.md#commands)* -Defined in src/views/cs.cds.views.pluginStepEditor.ts:42 +Defined in src/views/cs.cds.views.pluginStepEditor.ts:45 **Returns:** *[Dictionary](_core_types_dictionary_.dictionary.md)‹string, Function›* @@ -198,7 +216,7 @@ ___ *Overrides [View](_core_webui_view_.view.md).[construct](_core_webui_view_.view.md#abstract-construct)* -Defined in src/views/cs.cds.views.pluginStepEditor.ts:27 +Defined in src/views/cs.cds.views.pluginStepEditor.ts:30 **Parameters:** @@ -244,7 +262,7 @@ ___ ▸ **retrieveAttributes**(`logicalName`: string): *Promise‹void›* -Defined in src/views/cs.cds.views.pluginStepEditor.ts:49 +Defined in src/views/cs.cds.views.pluginStepEditor.ts:52 **Parameters:** @@ -260,7 +278,7 @@ ___ ▸ **save**(`step`: any): *void* -Defined in src/views/cs.cds.views.pluginStepEditor.ts:57 +Defined in src/views/cs.cds.views.pluginStepEditor.ts:60 **Parameters:** @@ -274,17 +292,18 @@ ___ ### setInitialState -▸ **setInitialState**(`pluginAssemblyId`: string, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `step?`: any): *Promise‹void›* +▸ **setInitialState**(`pluginAssemblyId`: string, `step?`: any, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `treeEntry?`: [CdsTreeEntry](_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md)): *Promise‹void›* -Defined in src/views/cs.cds.views.pluginStepEditor.ts:70 +Defined in src/views/cs.cds.views.pluginStepEditor.ts:77 **Parameters:** Name | Type | ------ | ------ | `pluginAssemblyId` | string | -`config?` | [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md) | `step?` | any | +`config?` | [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md) | +`treeEntry?` | [CdsTreeEntry](_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md) | **Returns:** *Promise‹void›* diff --git a/docs/extension/api/classes/_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md b/docs/extension/api/classes/_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md index 6cf25cf..8537296 100644 --- a/docs/extension/api/classes/_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md +++ b/docs/extension/api/classes/_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md @@ -20,13 +20,15 @@ sidebar_label: "PluginStepImageEditor" ### Properties -* [config](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#config) +* [config](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#private-config) * [disposables](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#protected-disposables) +* [edit](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#private-edit) * [onDidClose](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#ondidclose) * [onDidReceiveMessage](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#ondidreceivemessage) * [onReady](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#onready) * [options](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#options) * [renderer](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#protected-renderer) +* [treeEntry](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#private-treeentry) * [openViews](_views_cs_cds_views_pluginstepimageeditor_.pluginstepimageeditor.md#static-openviews) ### Accessors @@ -65,11 +67,11 @@ Name | Type | ## Properties -### config +### `Private` config • **config**: *[Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md)* -Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:25 +Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:26 ___ @@ -83,6 +85,14 @@ Defined in src/core/webui/View.ts:91 ___ +### `Private` edit + +• **edit**: *boolean* = false + +Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:28 + +___ + ### onDidClose • **onDidClose**: *Event‹[View](_core_webui_view_.view.md)›* = this._onDidClose.event @@ -133,6 +143,14 @@ Defined in src/core/webui/View.ts:92 ___ +### `Private` treeEntry + +• **treeEntry**: *[CdsTreeEntry](_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md)* + +Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:27 + +___ + ### `Static` openViews ▪ **openViews**: *object* @@ -155,7 +173,7 @@ Track the currently panel. Only allow a single panel to exist at a time. *Overrides [View](_core_webui_view_.view.md).[commands](_core_webui_view_.view.md#commands)* -Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:42 +Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:45 **Returns:** *[Dictionary](_core_types_dictionary_.dictionary.md)‹string, Function›* @@ -197,7 +215,7 @@ ___ *Overrides [View](_core_webui_view_.view.md).[construct](_core_webui_view_.view.md#abstract-construct)* -Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:27 +Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:30 **Parameters:** @@ -243,7 +261,7 @@ ___ ▸ **save**(`pluginStepImage`: any): *void* -Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:48 +Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:51 **Parameters:** @@ -257,17 +275,18 @@ ___ ### setInitialState -▸ **setInitialState**(`sdkmessageprocessingstepid`: string, `pluginStepImage`: any, `config`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md)): *Promise‹void›* +▸ **setInitialState**(`sdkmessageprocessingstepid`: string, `pluginStepImage?`: any, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `treeEntry?`: [CdsTreeEntry](_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md)): *Promise‹void›* -Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:62 +Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:69 **Parameters:** Name | Type | ------ | ------ | `sdkmessageprocessingstepid` | string | -`pluginStepImage` | any | -`config` | [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md) | +`pluginStepImage?` | any | +`config?` | [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md) | +`treeEntry?` | [CdsTreeEntry](_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md) | **Returns:** *Promise‹void›* diff --git a/docs/extension/api/classes/_views_viewmanager_.viewmanager.md b/docs/extension/api/classes/_views_viewmanager_.viewmanager.md index f1e9522..6890ba1 100644 --- a/docs/extension/api/classes/_views_viewmanager_.viewmanager.md +++ b/docs/extension/api/classes/_views_viewmanager_.viewmanager.md @@ -28,7 +28,7 @@ sidebar_label: "ViewManager" ▸ **editConnection**(`config`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md)): *Promise‹[View](_core_webui_view_.view.md)›* -Defined in src/views/ViewManager.ts:19 +Defined in src/views/ViewManager.ts:20 **Parameters:** @@ -44,7 +44,7 @@ ___ ▸ **openConnection**(): *Promise‹[View](_core_webui_view_.view.md)›* -Defined in src/views/ViewManager.ts:14 +Defined in src/views/ViewManager.ts:15 **Returns:** *Promise‹[View](_core_webui_view_.view.md)›* @@ -54,7 +54,7 @@ ___ ▸ **openJsonInspector**(`item`: any): *Promise‹any›* -Defined in src/views/ViewManager.ts:34 +Defined in src/views/ViewManager.ts:35 **Parameters:** @@ -70,7 +70,7 @@ ___ ▸ **openNewWorkspaceWelcome**(`config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md)): *Promise‹[View](_core_webui_view_.view.md)›* -Defined in src/views/ViewManager.ts:39 +Defined in src/views/ViewManager.ts:40 **Parameters:** @@ -84,17 +84,18 @@ ___ ### `Static` openPluginStep -▸ **openPluginStep**(`pluginAssemblyId`: string, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `step?`: any): *Promise‹[View](_core_webui_view_.view.md)›* +▸ **openPluginStep**(`pluginAssemblyId`: string, `step?`: any, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `treeEntry?`: [CdsTreeEntry](_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md)): *Promise‹[View](_core_webui_view_.view.md)›* -Defined in src/views/ViewManager.ts:24 +Defined in src/views/ViewManager.ts:25 **Parameters:** Name | Type | ------ | ------ | `pluginAssemblyId` | string | -`config?` | [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md) | `step?` | any | +`config?` | [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md) | +`treeEntry?` | [CdsTreeEntry](_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md) | **Returns:** *Promise‹[View](_core_webui_view_.view.md)›* @@ -102,17 +103,18 @@ ___ ### `Static` openPluginStepImage -▸ **openPluginStepImage**(`sdkmessageprocessingstepid`: string, `pluginStepImage`: any, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md)): *Promise‹[View](_core_webui_view_.view.md)›* +▸ **openPluginStepImage**(`sdkmessageprocessingstepid`: string, `pluginStepImage?`: any, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `treeEntry?`: [CdsTreeEntry](_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md)): *Promise‹[View](_core_webui_view_.view.md)›* -Defined in src/views/ViewManager.ts:29 +Defined in src/views/ViewManager.ts:30 **Parameters:** Name | Type | ------ | ------ | `sdkmessageprocessingstepid` | string | -`pluginStepImage` | any | +`pluginStepImage?` | any | `config?` | [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md) | +`treeEntry?` | [CdsTreeEntry](_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md) | **Returns:** *Promise‹[View](_core_webui_view_.view.md)›* @@ -122,7 +124,7 @@ ___ ▸ **openSvcUtilConfiguration**(`config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `viewModel?`: any): *Promise‹[View](_core_webui_view_.view.md)›* -Defined in src/views/ViewManager.ts:44 +Defined in src/views/ViewManager.ts:45 **Parameters:** diff --git a/docs/extension/api/index.md b/docs/extension/api/index.md index 6fec6d3..726626e 100644 --- a/docs/extension/api/index.md +++ b/docs/extension/api/index.md @@ -14,7 +14,7 @@ This extension is designed to help developers with a simple development loop for |Version|Link|| |:--|:--|:--| -|Release Version:|[0.8.12](https://github.com/cloudsmithconsulting/cds-for-code/releases/tag/v0.8.12)|![Marketplace: Version](https://flat.badgen.net/vs-marketplace/v/cloudsmithconsulting.cds-for-code) ![Marketplace: Installs](https://flat.badgen.net/vs-marketplace/i/cloudsmithconsulting.cds-for-code) ![Marketplace: Downloads](https://flat.badgen.net/vs-marketplace/d/cloudsmithconsulting.cds-for-code) ![Marketplace: Rating](https://flat.badgen.net/vs-marketplace/rating/cloudsmithconsulting.cds-for-code) ![Open Issues](https://flat.badgen.net/github/open-issues/cloudsmithconsulting/cds-for-code) ![Stars](https://flat.badgen.net/github/stars/cloudsmithconsulting/cds-for-code)| +|Release Version:|[0.8.13](https://github.com/cloudsmithconsulting/cds-for-code/releases/tag/v0.8.13)|![Marketplace: Version](https://flat.badgen.net/vs-marketplace/v/cloudsmithconsulting.cds-for-code) ![Marketplace: Installs](https://flat.badgen.net/vs-marketplace/i/cloudsmithconsulting.cds-for-code) ![Marketplace: Downloads](https://flat.badgen.net/vs-marketplace/d/cloudsmithconsulting.cds-for-code) ![Marketplace: Rating](https://flat.badgen.net/vs-marketplace/rating/cloudsmithconsulting.cds-for-code) ![Open Issues](https://flat.badgen.net/github/open-issues/cloudsmithconsulting/cds-for-code) ![Stars](https://flat.badgen.net/github/stars/cloudsmithconsulting/cds-for-code)| |Development Version:|[0.9.0](https://github.com/cloudsmithconsulting/cds-for-code/releases/tag/v0.9.0)|[![Board Status](https://dev.azure.com/cloudsmith-consulting/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/b63fc4c8-773b-4ffc-ac61-c71890277c2c/_apis/work/boardbadge/350decde-59a7-49b4-a6f6-ee220fa7e391)](https://dev.azure.com/cloudsmith-consulting/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/_boards/board/t/b63fc4c8-773b-4ffc-ac61-c71890277c2c/Microsoft.RequirementCategory/) [![Build Status](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_apis/build/status/cds-for-code?branchName=master)](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_build/latest?definitionId=2&branchName=master) [![Release Status](https://vsrm.dev.azure.com/cloudsmith-consulting/_apis/public/Release/badge/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/1/2)](https://vsrm.dev.azure.com/cloudsmith-consulting/_apis/public/Release/badge/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/1/2)| --- @@ -29,10 +29,8 @@ This extension is designed to help developers with a simple development loop for - [Features](#features) - [Commands](#commands) - [Commands and Descriptions](#commands-and-descriptions) - - [These commands can be executed directly through the VSCode command palette](#these-commands-can-be-executed-directly-through-the-vscode-command-palette) - [Settings](#settings) - [Settings and Descriptions](#settings-and-descriptions) - - [These settings are editable inside the VSCode Settings Editor](#these-settings-are-editable-inside-the-vscode-settings-editor) - [Known Issues](#known-issues) - [Change Log](#change-log) - [Contributors](#contributors) diff --git a/docs/extension/api/interfaces/_core_utilities_.objectutility.md b/docs/extension/api/interfaces/_core_utilities_.objectutility.md index d95d850..be61721 100644 --- a/docs/extension/api/interfaces/_core_utilities_.objectutility.md +++ b/docs/extension/api/interfaces/_core_utilities_.objectutility.md @@ -20,6 +20,7 @@ sidebar_label: "ObjectUtility" * [isNull](_core_utilities_.objectutility.md#isnull) * [isNullOrEmpty](_core_utilities_.objectutility.md#isnullorempty) * [isObject](_core_utilities_.objectutility.md#isobject) +* [sanitize](_core_utilities_.objectutility.md#sanitize) ## Methods @@ -128,3 +129,24 @@ Name | Type | `source` | any | **Returns:** *boolean* + +___ + +### sanitize + +▸ **sanitize**<**T**>(`source`: T, `excludeProperties`: string[]): *T* + +Defined in src/core/Utilities.ts:43 + +**Type parameters:** + +▪ **T** + +**Parameters:** + +Name | Type | +------ | ------ | +`source` | T | +`excludeProperties` | string[] | + +**Returns:** *T* diff --git a/docs/extension/api/interfaces/_core_utilities_.randomutility.md b/docs/extension/api/interfaces/_core_utilities_.randomutility.md index c66bbd4..fcdd42e 100644 --- a/docs/extension/api/interfaces/_core_utilities_.randomutility.md +++ b/docs/extension/api/interfaces/_core_utilities_.randomutility.md @@ -24,7 +24,7 @@ sidebar_label: "RandomUtility" ▸ **randomString**(`length`: number, `chars?`: string): *string* -Defined in src/core/Utilities.ts:48 +Defined in src/core/Utilities.ts:49 **Parameters:** @@ -41,7 +41,7 @@ ___ ▸ **randomStringBase64**(`length`: number): *string* -Defined in src/core/Utilities.ts:47 +Defined in src/core/Utilities.ts:48 **Parameters:** @@ -57,7 +57,7 @@ ___ ▸ **randomStringHex**(`length`: number): *string* -Defined in src/core/Utilities.ts:46 +Defined in src/core/Utilities.ts:47 **Parameters:** diff --git a/docs/extension/api/interfaces/_core_utilities_.stringutility.md b/docs/extension/api/interfaces/_core_utilities_.stringutility.md index 17dc3d5..86928dd 100644 --- a/docs/extension/api/interfaces/_core_utilities_.stringutility.md +++ b/docs/extension/api/interfaces/_core_utilities_.stringutility.md @@ -28,7 +28,7 @@ sidebar_label: "StringUtility" ▸ **dateAsFilename**(): *string* -Defined in src/core/Utilities.ts:53 +Defined in src/core/Utilities.ts:54 **Returns:** *string* @@ -38,7 +38,7 @@ ___ ▸ **noSlashes**(`string`: string): *string* -Defined in src/core/Utilities.ts:56 +Defined in src/core/Utilities.ts:57 **Parameters:** @@ -54,7 +54,7 @@ ___ ▸ **noTrailingSlash**(`string`: string): *string* -Defined in src/core/Utilities.ts:55 +Defined in src/core/Utilities.ts:56 **Parameters:** @@ -70,7 +70,7 @@ ___ ▸ **parseUtcDate**(`date`: string): *Date* -Defined in src/core/Utilities.ts:52 +Defined in src/core/Utilities.ts:53 **Parameters:** @@ -86,7 +86,7 @@ ___ ▸ **plural**(`value`: string): *string* -Defined in src/core/Utilities.ts:58 +Defined in src/core/Utilities.ts:59 **Parameters:** @@ -102,7 +102,7 @@ ___ ▸ **powerShellSafe**(`value`: string, `delimiter`: string): *string* -Defined in src/core/Utilities.ts:57 +Defined in src/core/Utilities.ts:58 **Parameters:** @@ -119,7 +119,7 @@ ___ ▸ **withTrailingSlash**(`path`: string | undefined): *string* -Defined in src/core/Utilities.ts:54 +Defined in src/core/Utilities.ts:55 **Parameters:** diff --git a/docs/extension/api/interfaces/_core_utilities_.utilityobject.md b/docs/extension/api/interfaces/_core_utilities_.utilityobject.md index 9abb5a8..a3b6ea6 100644 --- a/docs/extension/api/interfaces/_core_utilities_.utilityobject.md +++ b/docs/extension/api/interfaces/_core_utilities_.utilityobject.md @@ -27,7 +27,7 @@ sidebar_label: "UtilityObject" • **$Object**: *[ObjectUtility](_core_utilities_.objectutility.md)* -Defined in src/core/Utilities.ts:65 +Defined in src/core/Utilities.ts:66 ___ @@ -35,7 +35,7 @@ ___ • **Browser**: *[BrowserUtility](_core_utilities_.browserutility.md)* -Defined in src/core/Utilities.ts:62 +Defined in src/core/Utilities.ts:63 ___ @@ -43,7 +43,7 @@ ___ • **Encoding**: *[EncodingUtility](_core_utilities_.encodingutility.md)* -Defined in src/core/Utilities.ts:63 +Defined in src/core/Utilities.ts:64 ___ @@ -51,7 +51,7 @@ ___ • **Guid**: *[GuidUtility](_core_utilities_.guidutility.md)* -Defined in src/core/Utilities.ts:64 +Defined in src/core/Utilities.ts:65 ___ @@ -59,7 +59,7 @@ ___ • **Random**: *[RandomUtility](_core_utilities_.randomutility.md)* -Defined in src/core/Utilities.ts:66 +Defined in src/core/Utilities.ts:67 ___ @@ -67,4 +67,4 @@ ___ • **String**: *[StringUtility](_core_utilities_.stringutility.md)* -Defined in src/core/Utilities.ts:67 +Defined in src/core/Utilities.ts:68 diff --git a/docs/extension/api/modules/_core_helpers_object_.md b/docs/extension/api/modules/_core_helpers_object_.md index 4118333..d6a9a00 100644 --- a/docs/extension/api/modules/_core_helpers_object_.md +++ b/docs/extension/api/modules/_core_helpers_object_.md @@ -16,6 +16,7 @@ sidebar_label: "core/helpers/Object" * [isNull](_core_helpers_object_.md#isnull) * [isNullOrEmpty](_core_helpers_object_.md#isnullorempty) * [isObject](_core_helpers_object_.md#isobject) +* [sanitize](_core_helpers_object_.md#sanitize) ## Functions @@ -61,7 +62,7 @@ ___ ▸ **createInstance**<**T**>(`context`: Object, `name`: string, ...`args`: any[]): *T* -Defined in src/core/helpers/Object.ts:38 +Defined in src/core/helpers/Object.ts:57 **Type parameters:** @@ -124,3 +125,24 @@ Name | Type | `source` | any | **Returns:** *boolean* + +___ + +### sanitize + +▸ **sanitize**<**T**>(`source`: T, `excludeProperties`: string[]): *T* + +Defined in src/core/helpers/Object.ts:42 + +**Type parameters:** + +▪ **T** + +**Parameters:** + +Name | Type | +------ | ------ | +`source` | T | +`excludeProperties` | string[] | + +**Returns:** *T* diff --git a/docs/extension/api/modules/_views_cs_cds_views_pluginstepeditor_.md b/docs/extension/api/modules/_views_cs_cds_views_pluginstepeditor_.md index c6a34ae..4585e44 100644 --- a/docs/extension/api/modules/_views_cs_cds_views_pluginstepeditor_.md +++ b/docs/extension/api/modules/_views_cs_cds_views_pluginstepeditor_.md @@ -32,16 +32,17 @@ Defined in src/views/cs.cds.views.pluginStepEditor.ts:7 ### openView -▸ **openView**(`pluginAssemblyId`: string, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `step?`: any): *Promise‹[View](../classes/_core_webui_view_.view.md)›* +▸ **openView**(`pluginAssemblyId`: string, `step?`: any, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `treeEntry?`: [CdsTreeEntry](../classes/_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md)): *Promise‹[View](../classes/_core_webui_view_.view.md)›* -Defined in src/views/cs.cds.views.pluginStepEditor.ts:12 +Defined in src/views/cs.cds.views.pluginStepEditor.ts:13 **Parameters:** Name | Type | ------ | ------ | `pluginAssemblyId` | string | -`config?` | [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md) | `step?` | any | +`config?` | [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md) | +`treeEntry?` | [CdsTreeEntry](../classes/_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md) | **Returns:** *Promise‹[View](../classes/_core_webui_view_.view.md)›* diff --git a/docs/extension/api/modules/_views_cs_cds_views_pluginstepimageeditor_.md b/docs/extension/api/modules/_views_cs_cds_views_pluginstepimageeditor_.md index 2eef0f4..5c8876c 100644 --- a/docs/extension/api/modules/_views_cs_cds_views_pluginstepimageeditor_.md +++ b/docs/extension/api/modules/_views_cs_cds_views_pluginstepimageeditor_.md @@ -20,16 +20,17 @@ sidebar_label: "views/cs.cds.views.pluginStepImageEditor" ### openView -▸ **openView**(`sdkmessageprocessingstepid`: string, `pluginStepImage`: any, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md)): *Promise‹[View](../classes/_core_webui_view_.view.md)›* +▸ **openView**(`sdkmessageprocessingstepid`: string, `pluginStepImage?`: any, `config?`: [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md), `treeEntry?`: [CdsTreeEntry](../classes/_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md)): *Promise‹[View](../classes/_core_webui_view_.view.md)›* -Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:12 +Defined in src/views/cs.cds.views.pluginStepImageEditor.ts:13 **Parameters:** Name | Type | ------ | ------ | `sdkmessageprocessingstepid` | string | -`pluginStepImage` | any | +`pluginStepImage?` | any | `config?` | [Config](../interfaces/_api_cds_webapi_cdswebapi_.cdswebapi.config.md) | +`treeEntry?` | [CdsTreeEntry](../classes/_views_cs_cds_viewcontainers_cdsexplorer_.cdstreeentry.md) | **Returns:** *Promise‹[View](../classes/_core_webui_view_.view.md)›* diff --git a/package.json b/package.json index 873aa25..9f0e5bc 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "bugs": { "url": "https://github.com/cloudsmithconsulting/cds-for-code/issues" }, - "version": "0.8.12", + "version": "0.8.13", "preview": true, "engines": { "vscode": "^1.41.0" diff --git a/resources/framework/scss/components/_variables-vscode.scss b/resources/framework/scss/components/_variables-vscode.scss index 84cbb00..1cc6cb6 100644 --- a/resources/framework/scss/components/_variables-vscode.scss +++ b/resources/framework/scss/components/_variables-vscode.scss @@ -85,7 +85,7 @@ $button-small-height: $button-height * .9 !default; $button-floating-small-size: $button-height * .9 !default; // Flat buttons -$button-flat-color: vscode-color("button", "background") !default; +$button-flat-color: vscode-color("button", "foreground") !default; $button-flat-disabled-color: lighten(#999, 10%) !default; // Floating buttons diff --git a/resources/powershell/Generate-XrmEntities.ps1 b/resources/powershell/Generate-XrmEntities.ps1 index 6a52186..2163eae 100644 --- a/resources/powershell/Generate-XrmEntities.ps1 +++ b/resources/powershell/Generate-XrmEntities.ps1 @@ -61,7 +61,7 @@ Param $Password, [string] - [parameter(Mandatory = $false, ParameterSetName = "NoConnectionString", HelpMessage = " Domain to authenticate against when connecting to the server")] + [parameter(Mandatory = $false, ParameterSetName = "NoConnectionString", HelpMessage = "Domain to authenticate against when connecting to the server")] $Domain = "", [string] @@ -129,7 +129,7 @@ if ($GenerateActions) $CrmSvcUtil = (Join-Path $ToolsPath -ChildPath "CrmSvcUtil.exe") if ($Interactive) { - $Arguments = "/nologo /url:'$Url' /interactivelogin $Namespace$ServiceContextName$GenerateActionsString/out:$FullPath" + $Arguments = "/nologo /url:""$Url"" /interactivelogin $Namespace$ServiceContextName$GenerateActionsString/out:$FullPath" } else { if ($ConnectionString -eq "") { $bstr = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($Password); @@ -143,9 +143,9 @@ if ($Interactive) { [Runtime.InteropServices.Marshal]::FreeBSTR($bstr); } - $Arguments = "/nologo /url:'$Url' /username:$Username /password:$UnsecurePassword $Domain$Namespace$ServiceContextName$GenerateActionsString/out:$FullPath" + $Arguments = "/nologo /url:""$Url"" /username:""$Username"" /password:""$UnsecurePassword"" $Domain$Namespace$ServiceContextName$GenerateActionsString/out:$FullPath" } else { - $Arguments = "/nologo /url:'$Url' /connectionstring:'$ConnectionString' $Namespace$ServiceContextName$GenerateActionsString/out:$FullPath" + $Arguments = "/nologo /url:""$Url"" /connectionstring:""$ConnectionString"" $Namespace$ServiceContextName$GenerateActionsString/out:$FullPath" } } diff --git a/resources/scripts/iconify.min.js b/resources/scripts/iconify.min.js new file mode 100644 index 0000000..62834bc --- /dev/null +++ b/resources/scripts/iconify.min.js @@ -0,0 +1,13 @@ +/** + * (c) Vjacheslav Trushkin + * + * For the full copyright and license information, please view the license.txt or license.gpl.txt + * files at https://github.com/iconify/iconify + * + * Licensed under Apache 2.0 or GPL 2.0 at your option. + * If derivative product is not compatible with one of licenses, you can pick one of licenses. + * + * @license Apache 2.0 + * @license GPL 2.0 + */ +"use strict";if(void 0===self.Iconify&&(self.Iconify={isReady:!1},self.SimpleSVG=self.Iconify,function(e,t){var i,n,o,r,s,c,a,l,u,d,f,h,p,v,g,b,m,y,w,_,x,O,j,I,A,E,k,C,M,L,S,N,P,T,F,R,D,H,V,G,Q,z,B,q,Y,J,U,W,$,K,X,Z,ee,te,ie,ne,oe,re={config:{},version:"1.0.3"};function se(){document.removeEventListener("DOMContentLoaded",se),window.removeEventListener("load",se),o.DOMReadyCallback()}function ce(t,i,e){var n=t;if("_"!==t.slice(0,1)){if(void 0===u[t]){if(!e||void 0===u["_"+t])return;n="_"+t}switch(n){case"API":case"SVGAttributes":Object.keys(i).forEach(function(e){null===i[t]?delete u[n][e]:u[n][e]=i[e]});break;default:u[n]=i}}}function ae(e,t){return function(e,t){switch(e){case"rotate":return t=parseInt(t),isNaN(t)?null:t;case"width":case"height":case"inlineHeight":case"inlineTop":case"verticalAlign":return t=parseFloat(t),isNaN(t)?null:t;case"vFlip":case"hFlip":return!!t;case"body":case"parent":return"string"==typeof t?t:null}return t}("rotate",e+t)}function le(e,t){return!!e!=!!t}function ue(e){var i=Object.create(null);return(void 0===e._defaults?[e,v]:[e,e._defaults,v]).forEach(function(t){Object.keys(t).forEach(function(e){"object"!=typeof t[e]&&void 0===i[e]&&(i[e]=t[e])})}),void 0===i.inlineTop&&(i.inlineTop=i.top),void 0===i.inlineHeight&&(i.inlineHeight=i.height),void 0===i.verticalAlign&&(i.height%7==0&&i.height%8!=0?i.verticalAlign=-.143:i.verticalAlign=-.125),i}function de(){return this._icons=Object.create(null),this._aliases=Object.create(null),this._resolved=Object.create(null),this._add=function(e,t,i){var n=e?"_aliases":"_icons";void 0===this._resolved[t.prefix]?(this._resolved[t.prefix]=Object.create(null),this._icons[t.prefix]=Object.create(null),this._aliases[t.prefix]=Object.create(null)):(delete this._icons[t.prefix][t.icon],delete this._aliases[t.prefix][t.icon]),this._resolved[t.prefix][t.icon]=!1,this[n][t.prefix][t.icon]=i},this._resolveIcon=function(e){var t,i,n,o,r,s;if(void 0===this._resolved[e.prefix]||void 0===this._resolved[e.prefix][e.icon])return null;if(!1!==this._resolved[e.prefix][e.icon])return this._resolved[e.prefix][e.icon];if(void 0!==this._icons[e.prefix][e.icon])return this._resolved[e.prefix][e.icon]=ue(this._icons[e.prefix][e.icon]);for(i=0,t=this._aliases[e.prefix][e.icon],n=Object.create(null),Object.keys(t).forEach(function(e){"parent"!==e&&(n[e]=t[e])}),o=t.parent;;){if(5<++i||void 0===this._resolved[e.prefix][o])return this._resolved[e.prefix][e.icon]=null;if(r=void 0===this._icons[e.prefix][o],s=this[r?"_aliases":"_icons"][e.prefix][o],Object.keys(s).forEach(function(e){if(void 0!==n[e])switch(e){case"rotate":n[e]=ae(n[e],s[e]);break;case"hFlip":case"vFlip":n[e]=le(n[e],s[e])}else"parent"!==e&&(n[e]=s[e])}),!r)break;o=s.parent}return this._resolved[e.prefix][e.icon]=ue(n)},this.addCollection=function(n){var o=this,r=Object.create(null);g.forEach(function(e){void 0!==n[e]?r[e]=n[e]:void 0!==v[e]&&(r[e]=v[e])}),void 0!==n.icons&&Object.keys(n.icons).forEach(function(e){var t=p(e,n.prefix),i=n.icons[e];void 0!==i.body&&(i._defaults=r,o._add(!1,t,i))}),void 0!==n.aliases&&Object.keys(n.aliases).forEach(function(e){var t=p(e,n.prefix),i=n.aliases[e];if(void 0!==i.parent){if(void 0===n.prefix){if(i.parent.slice(0,t.prefix.length)!==t.prefix)return;i.parent=i.parent.slice(t.prefix.length+1)}o._add(!0,t,i)}})},this.addIcon=function(e,t,i){var n=void 0!==t.parent,o=p(e,i);if(n&&void 0===i){if(t.parent.slice(0,o.prefix.length)!==o.prefix)return;t.parent=t.parent.slice(o.prefix.length+1)}this._add(n,o,t)},this.exists=function(e,t){var i=p(e,t);return void 0!==this._resolved[i.prefix]&&void 0!==this._resolved[i.prefix][i.icon]},this.getIcon=function(e,t){var i=p(e,t);return this._resolveIcon(i)},this.copyIcon=function(e,t){var i,n=this.getIcon(e,t);return null===n?null:(i=Object.create(null),Object.keys(n).forEach(function(e){i[e]=n[e]}),i)},this.list=function(e){var i,n;return void 0!==e?void 0===this._resolved[e]?[]:Object.keys(this._resolved[e]):(i=[],n=this._resolved,Object.keys(n).forEach(function(t){i=i.concat(Object.keys(n[t]).map(function(e){return""===t&&-1===e.indexOf("-")?e:t+":"+e}))}),i)},this}function fe(){w&&(w=!1,m.scanDOM())}function he(e,t,i){var n,o,r,s,c;if(1===t)return e;if(i=void 0===i?100:i,"number"==typeof e)return Math.ceil(e*t*i)/i;if("string"!=typeof e)return e;if(null===(n=e.split(j))||!n.length)return e;for(o=[],r=n.shift(),s=I.test(r);;){if(s?(c=parseFloat(r),isNaN(c)?o.push(r):o.push(Math.ceil(c*t*i)/i)):o.push(r),void 0===(r=n.shift()))return o.join("");s=!s}}function pe(e,t,i){var n,o,r;for(n=0;n"),e=e.slice(i+1)),e=-1!==(i=(e=e.replace("viewbox=","viewBox=").replace("preserveaspectratio=","preserveAspectRatio=")).indexOf("",">"+t+"")}i=re,function(){function e(e,t){var i;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},(i=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)}(),i.event=function(e,t){document.dispatchEvent(new CustomEvent(e,t))},n=e,r=(o=re).config,s=null,o.DOMReadyCallback=function(){o.domready=!0,o.nextInitItem()},o.initTimeout=function(e){function t(){if(null!==s){if(!1!==s.callback())return s.stop(),void o.nextInitItem();s.counter++,10!==s.counter&&25!==s.counter||(window.clearInterval(s.id),s.id=window.setInterval(t,10===s.counter?250:1e3))}}null!==s&&s.stop(),s={id:window.setInterval(t,100),counter:0,callback:e,stop:function(){window.clearInterval(s.id),s=null},nextTick:t}},o.domready=!1,o.ready=!1,o.initQueue=[],o.readyQueue=[],o.nextInitItem=function(){var e;if(!o.ready){if(o.initQueue.length)e=o.initQueue.shift();else{if(!o.domready)return void o.initTimeout(function(){return!o.domready&&document.body&&o.scanDOM(),o.domready});if(!o.readyQueue.length)return o.ready=n.isReady=!0,o.event(r._readyEvent),void o.scanDOM();e=o.readyQueue.shift()}!1!==e()&&o.nextInitItem()}},o.addStylesheet=function(e){var t;return document.head&&document.body?((t=document.createElement("style")).type="text/css",t.innerHTML="span.iconify, i.iconify, iconify-icon { display: inline-block; width: 1em; }",null!==document.head.firstChild?document.head.insertBefore(t,document.head.firstChild):document.head.appendChild(t),!0):!!o.domready||(e||o.initTimeout(o.addStylesheet.bind(null,!0)),!1)},o.initQueue.push(o.addStylesheet.bind(null,!1)),n.ready=function(e){n.isReady?window.setTimeout(e):document.addEventListener(r._readyEvent,e)},window.setTimeout(function(){"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?o.domready=!0:(document.addEventListener("DOMContentLoaded",se),window.addEventListener("load",se)),o.nextInitItem()}),(c=re.config).SVGAttributes=Object.create(null),c._imageClass="iconify",c._loadingClass="svg-loading",c._iconAttribute="data-icon",c._rotateAttribute="data-rotate",c._flipAttribute="data-flip",c._inlineModeAttribute="data-inline",c._alignAttribute="data-align",c._appendAttribute="data-icon-append",c._appendedClass="svg-appended",c._readyEvent="IconifyReady",c._webComponentsPolyfill="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.24/webcomponents-lite.min.js",c._classListPolyfill="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20150312/classList.min.js",function(t){t.defaultAPI="https://api.iconify.design/{prefix}.js?icons={icons}",t.API=Object.create(null),t.loaderMaxURLSize=500,t.loadBeforeDOMReady=!(document&&document.body),t._loaderEvent="IconifyAddedIcons",t.sessionStorage=!0;try{t.localStorage=!!(window&&window.localStorage&&window.localStorage.length)}catch(e){t.localStorage=!1}}(re.config),a=e,l=t,u=re.config,a.setConfig=function(e,t){ce(e,t,!1)},a.setCustomAPI=function(e,t){switch(typeof e){case"string":break;case"object":if(e instanceof Array)break;default:return}e.forEach(function(e){null===t?delete u.API[e]:u.API[e]=t})},a.getConfig=function(e){return void 0===u[e]?void 0===u["_"+e]?null:u["_"+e]:u[e]},["SimpleSVG","Iconify"].forEach(function(e){var t;void 0!==l[e+"Config"]&&"object"==typeof l[e+"Config"]&&(t=l[e+"Config"],Object.keys(t).forEach(function(e){ce(e,t[e],!0)}))}),f=(d=re).config,h=t,d.initQueue.push(function(){var e={observer:!1,classList:!1},t={observer:!1,classList:!1};function i(e){var t;return!e.length||(document.head?((t=document.createElement("script")).setAttribute("src",e),t.setAttribute("type","text/javascript"),document.head.appendChild(t),!0):d.domready)}function n(){return"classList"in document.createElement("div")||(t.classList||(t.classList=i(f._classListPolyfill)),!1)}function o(){return h.MutationObserver&&h.WeakMap||t.observer||(t.observer=i(f._webComponentsPolyfill)),!0}return e.classList=!n(),e.observer=!o(),!e.classList&&!e.observer||(d.initTimeout(function(){return!(e.observer&&!o()||e.classList&&!n())}),!1)}),re.getPrefix=function(e,t){var i;return"string"==typeof t&&""!==t?{prefix:t,icon:e}:2===(i=e.split(":")).length?{prefix:i[0],icon:i[1]}:1<(i=e.split("-")).length?{prefix:t=i.shift(),icon:i.join("-")}:{prefix:"",icon:e}},p=re.getPrefix,v={left:0,top:0,width:16,height:16,rotate:0,vFlip:!1,hFlip:!1},g=["left","top","width","height","body","rotate","vFlip","hFlip","inlineTop","inlineHeight","verticalAlign"],de.mergeFlip=le,de.mergeRotation=ae,de.blankIcon=function(){return ue({body:"",width:16,height:16})},re.Storage=de,b=e,y=t,w=!1,_=new(m=re).Storage,b.addCollection=function(e,t){_.addCollection(e),w||!0===t||(w=!0,window.setTimeout(fe,0))},b.addIcon=function(e,t,i){_.addIcon(e,t),w||!0===i||(w=!0,window.setTimeout(fe,0))},b.iconExists=_.exists.bind(_),b.getIcon=_.copyIcon.bind(_),b.listIcons=_.list.bind(_),["SimpleSVG","Iconify"].forEach(function(e){void 0!==y[e+"Preload"]&&y[e+"Preload"]instanceof Array&&y[e+"Preload"].forEach(function(e){"object"==typeof e&&void 0!==e.icons&&b.addCollection(e)})}),x=re.Storage,O=re.config,j=/(-?[0-9.]*[0-9]+[0-9.]*)/g,I=/^-?[0-9.]*[0-9]+[0-9.]*$/g,A=["width","height","inline"],E=["title"],k=0,re.SVG=function(w){return w=w||x.blankIcon(),this.item=w,this.height=function(e,t,i){return void 0===e?t?this.item.inlineHeight:this.item.height:he(e,(t?this.item.inlineHeight:this.item.height)/this.item.width,i)},this.width=function(e,t,i){return void 0===e?this.item.width:he(e,this.item.width/(t?this.item.inlineHeight:this.item.height),i)},this.defaultAttributes=function(){return{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",focusable:"false"}},this.preserveAspectRatio=function(e,t,i){var n="";switch(e){case"left":n+="xMin";break;case"right":n+="xMax";break;default:n+="xMid"}switch(t){case"top":n+="YMin";break;case"bottom":n+="YMax";break;default:n+="YMid"}return n+=!0===i?" slice":" meet"},this.htmlspecialchars=function(e){switch(typeof e){case"boolean":case"number":return e+"";case"string":return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}return""},this.attributes=function(t){var e,i,n,o,r,s,c,a,l,u,d,f,h,p=this,v={horizontal:"center",vertical:"middle",crop:!1},g={rotate:w.rotate,hFlip:w.hFlip,vFlip:w.vFlip},b="",m=this.defaultAttributes(),y=[];if(s=pe(t="object"==typeof t?t:Object.create(null),[O._inlineModeAttribute,"inline"],!0),u=pe(t,[O._appendAttribute],!1),e={left:w.left,top:s?w.inlineTop:w.top,width:w.width,height:s?w.inlineHeight:w.height},"string"==typeof t[O._flipAttribute]&&t[O._flipAttribute].split(/[\s,]+/).forEach(function(e){switch(e=e.toLowerCase()){case"horizontal":g.hFlip=!g.hFlip;break;case"vertical":g.vFlip=!g.vFlip}}),void 0!==t[O._rotateAttribute])if("number"==typeof(a=t[O._rotateAttribute]))g.rotate+=a;else if("string"==typeof a)if(""===(d=a.replace(/^-?[0-9.]*/,"")))a=parseInt(a),isNaN(a)||(g.rotate+=a);else if(d!==a){switch(l=!1,d){case"%":l=25;break;case"deg":l=90}l&&(a=parseInt(a.slice(0,a.length-d.length)),isNaN(a)||(g.rotate+=Math.round(a/l)))}switch(g.hFlip?g.vFlip?g.rotate+=2:(y.push("translate("+(e.width+e.left)+" "+(0-e.top)+")"),y.push("scale(-1 1)"),e.top=e.left=0):g.vFlip&&(y.push("translate("+(0-e.left)+" "+(e.height+e.top)+")"),y.push("scale(1 -1)"),e.top=e.left=0),g.rotate%4){case 1:h=e.height/2+e.top,y.unshift("rotate(90 "+h+" "+h+")"),0===e.left&&0===e.top||(h=e.left,e.left=e.top,e.top=h),e.width!==e.height&&(h=e.width,e.width=e.height,e.height=h);break;case 2:y.unshift("rotate(180 "+(e.width/2+e.left)+" "+(e.height/2+e.top)+")");break;case 3:h=e.width/2+e.left,y.unshift("rotate(-90 "+h+" "+h+")"),0===e.left&&0===e.top||(h=e.left,e.left=e.top,e.top=h),e.width!==e.height&&(h=e.width,e.width=e.height,e.height=h)}return i=ve(t,["data-width","width"],null),n=ve(t,["data-height","height"],null),null===i&&null===n&&(n="1em"),null!==i&&null!==n?(o=i,r=n):null!==i?r=he(o=i,e.height/e.width):o=he(r=n,e.width/e.height),!1!==o&&(m.width="auto"===o?e.width:o),!1!==r&&(m.height="auto"===r?e.height:r),s&&0!==w.verticalAlign&&(b+="vertical-align: "+w.verticalAlign+"em;"),"string"==typeof t[O._alignAttribute]&&t[O._alignAttribute].toLowerCase().split(/[\s,]+/).forEach(function(e){switch(e){case"left":case"right":case"center":v.horizontal=e;break;case"top":case"bottom":case"middle":v.vertical=e;break;case"crop":v.crop=!0;break;case"meet":v.crop=!1}}),b+="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);",m.style=b+(void 0===t.style?"":t.style),m.preserveAspectRatio=this.preserveAspectRatio(v.horizontal,v.vertical,v.crop),m.viewBox=e.left+" "+e.top+" "+e.width+" "+e.height,c=function(i){var e,n,t=/\sid="(\S+)"/g,o=[];function r(e,t,i){for(var n=0;-1!==(n=i.indexOf(e,n));)i=i.slice(0,n)+t+i.slice(n+e.length),n+=t.length;return i}for(;e=t.exec(i);)o.push(e[1]);return o.length&&(n="IconifyId-"+Date.now().toString(16)+"-"+(16777216*Math.random()|0).toString(16)+"-",o.forEach(function(e){var t=n+k;k++,i=r("(#"+e+")","(#"+t+")",i=r('="#'+e+'"','="#'+t+'"',i=r('="'+e+'"','="'+t+'"',i)))})),i}(this.item.body),y.length&&(c=''+c+""),f=Object.create(null),Object.keys(t).forEach(function(e){void 0===m[e]&&(-1!==E.indexOf(e)?c="<"+e+">"+p.htmlspecialchars(t[e])+""+c:-1===A.indexOf(e)&&(f[e]=t[e]))}),{attributes:m,elementAttributes:f,body:c,append:u}},this},M=(C=re).config._loadingClass,C.newImage=function(e,t,i){return{element:e,icon:t,parser:i,loading:e.classList.contains(M)}},C.parsedImage=function(e,t){return{element:e,icon:t}},C.getImageAttributes=function(t){var e,i,n=Object.create(null);if(!t.element.hasAttributes())return n;for(e=0;e=n)return;if("string"!=typeof(i=e.getItem("iconify"+V[t])))return;"object"==typeof(i=JSON.parse(i))&&L.addCollection(i),V[t]++}}catch(e){H[t]=!1}}),G=e,z=(Q=re).config,B=t,Y=0,W={childList:!(U=!1),subtree:!(J=q=null)},G.pauseObserving=function(){null!==q&&(Y||(J=q.takeRecords(),q.disconnect())),Y++},G.resumeObserving=function(){null!==q?Y&&(--Y||(we(),null!==J&&J.length&&ye(J))):Y--},G.isObserverPaused=function(){return null===q||!!Y},Q.readyQueue.push(function(){return q=new B.MutationObserver(ye),Y||we(),!0}),$=e,X=(K=re).config,Z=X._iconAttribute,ee=X._loadingClass,te=X._imageClass,ie=X._appendedClass,K.renderSVG=function(t){var e,i,n,o,r,s,c=K.getImageAttributes(t),a=$.getIcon(t.icon);c[Z]=t.icon,e=new K.SVG(a),n=document.createElement("svg"),r=e.attributes(c),Object.keys(r.attributes).forEach(function(e){try{n.setAttribute(e,r.attributes[e])}catch(e){}}),Object.keys(r.elementAttributes).forEach(function(e){try{(r.append?t.element:n).setAttribute(e,r.elementAttributes[e])}catch(e){}}),t.loading&&(n.classList.remove(ee),r.append&&t.element.classList.remove(ee)),n.classList.add(te),s=_e(n.outerHTML,r.body),(o=document.createElement("span")).innerHTML=s,i=o.childNodes[0],r.append?(t.element.classList.add(ie),t.element.appendChild(i)):(t.element.parentNode.replaceChild(i,t.element),t.element=i),delete t.parser,delete t.loading},$.getSVGObject=function(e,t){return!!$.iconExists(e)&&new K.SVG($.getIcon(e)).attributes(t,!1)},$.getSVG=function(e,t){var i,n;return!1!==(n=$.getSVGObject(e,t))&&(i=document.createElement("svg"),Object.keys(n.attributes).forEach(function(e){try{i.setAttribute(e,n.attributes[e])}catch(e){}}),_e(i.outerHTML,n.body))},ne=e,(oe=re).scanDOM=function(){var t=!1;function e(){oe.findNewImages().forEach(function(e){oe.loadImage(e)&&(t||(t=!0,ne.pauseObserving()),oe.renderSVG(e))})}if(oe.ready)e();else try{e()}catch(e){}t&&ne.resumeObserving()},ne.scanDOM=oe.scanDOM,ne.getVersion=function(){return oe.version}}(self.Iconify,self)),"object"==typeof exports)try{exports.__esModule=!0,exports.default=self.Iconify}catch(e){} \ No newline at end of file diff --git a/resources/styles/materialize.vscode.css b/resources/styles/materialize.vscode.css index 1549065..33521a9 100644 --- a/resources/styles/materialize.vscode.css +++ b/resources/styles/materialize.vscode.css @@ -3871,12 +3871,12 @@ } /*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */ -/* Document +/* Document ========================================================================== */ -/** - * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in - * IE on Windows Phone and in iOS. +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in + * IE on Windows Phone and in iOS. */ html { line-height: 1.15; @@ -3887,17 +3887,17 @@ html { /* 2 */ } -/* Sections +/* Sections ========================================================================== */ -/** - * Remove the margin in all browsers (opinionated). +/** + * Remove the margin in all browsers (opinionated). */ body { margin: 0; } -/** - * Add the correct display in IE 9-. +/** + * Add the correct display in IE 9-. */ article, aside, @@ -3908,20 +3908,20 @@ section { display: block; } -/** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. */ h1 { font-size: 2em; margin: 0.67em 0; } -/* Grouping content +/* Grouping content ========================================================================== */ -/** - * Add the correct display in IE 9-. - * 1. Add the correct display in IE. +/** + * Add the correct display in IE 9-. + * 1. Add the correct display in IE. */ figcaption, figure, @@ -3930,16 +3930,16 @@ main { display: block; } -/** - * Add the correct margin in IE 8. +/** + * Add the correct margin in IE 8. */ figure { margin: 1em 40px; } -/** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. */ hr { box-sizing: content-box; @@ -3950,9 +3950,9 @@ hr { /* 2 */ } -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. */ pre { font-family: monospace, monospace; @@ -3961,11 +3961,11 @@ pre { /* 2 */ } -/* Text-level semantics +/* Text-level semantics ========================================================================== */ -/** - * 1. Remove the gray background on active links in IE 10. - * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. +/** + * 1. Remove the gray background on active links in IE 10. + * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. */ a { background-color: transparent; @@ -3974,9 +3974,9 @@ a { /* 2 */ } -/** - * 1. Remove the bottom border in Chrome 57- and Firefox 39-. - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. +/** + * 1. Remove the bottom border in Chrome 57- and Firefox 39-. + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. */ abbr[title] { border-bottom: none; @@ -3988,25 +3988,25 @@ abbr[title] { /* 2 */ } -/** - * Prevent the duplicate application of `bolder` by the next rule in Safari 6. +/** + * Prevent the duplicate application of `bolder` by the next rule in Safari 6. */ b, strong { font-weight: inherit; } -/** - * Add the correct font weight in Chrome, Edge, and Safari. +/** + * Add the correct font weight in Chrome, Edge, and Safari. */ b, strong { font-weight: bolder; } -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. */ code, kbd, @@ -4017,31 +4017,31 @@ samp { /* 2 */ } -/** - * Add the correct font style in Android 4.3-. +/** + * Add the correct font style in Android 4.3-. */ dfn { font-style: italic; } -/** - * Add the correct background and color in IE 9-. +/** + * Add the correct background and color in IE 9-. */ mark { background-color: #ff0; color: #000; } -/** - * Add the correct font size in all browsers. +/** + * Add the correct font size in all browsers. */ small { font-size: 80%; } -/** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. */ sub, sup { @@ -4059,43 +4059,43 @@ sup { top: -0.5em; } -/* Embedded content +/* Embedded content ========================================================================== */ -/** - * Add the correct display in IE 9-. +/** + * Add the correct display in IE 9-. */ audio, video { display: inline-block; } -/** - * Add the correct display in iOS 4-7. +/** + * Add the correct display in iOS 4-7. */ audio:not([controls]) { display: none; height: 0; } -/** - * Remove the border on images inside links in IE 10-. +/** + * Remove the border on images inside links in IE 10-. */ img { border-style: none; } -/** - * Hide the overflow in IE. +/** + * Hide the overflow in IE. */ svg:not(:root) { overflow: hidden; } -/* Forms +/* Forms ========================================================================== */ -/** - * 1. Change the font styles in all browsers (opinionated). - * 2. Remove the margin in Firefox and Safari. +/** + * 1. Change the font styles in all browsers (opinionated). + * 2. Remove the margin in Firefox and Safari. */ button, input, @@ -4112,9 +4112,9 @@ textarea { /* 2 */ } -/** - * Show the overflow in IE. - * 1. Show the overflow in Edge. +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. */ button, input { @@ -4122,9 +4122,9 @@ input { overflow: visible; } -/** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. */ button, select { @@ -4132,10 +4132,10 @@ select { text-transform: none; } -/** - * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` - * controls in Android 4. - * 2. Correct the inability to style clickable types in iOS and Safari. +/** + * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` + * controls in Android 4. + * 2. Correct the inability to style clickable types in iOS and Safari. */ button, html [type="button"], @@ -4145,8 +4145,8 @@ html [type="button"], /* 2 */ } -/** - * Remove the inner border and padding in Firefox. +/** + * Remove the inner border and padding in Firefox. */ button::-moz-focus-inner, [type="button"]::-moz-focus-inner, @@ -4156,8 +4156,8 @@ button::-moz-focus-inner, padding: 0; } -/** - * Restore the focus styles unset by the previous rule. +/** + * Restore the focus styles unset by the previous rule. */ button:-moz-focusring, [type="button"]:-moz-focusring, @@ -4166,18 +4166,18 @@ button:-moz-focusring, outline: 1px dotted ButtonText; } -/** - * Correct the padding in Firefox. +/** + * Correct the padding in Firefox. */ fieldset { padding: 0.35em 0.75em 0.625em; } -/** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. */ legend { box-sizing: border-box; @@ -4194,9 +4194,9 @@ legend { /* 1 */ } -/** - * 1. Add the correct display in IE 9-. - * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. +/** + * 1. Add the correct display in IE 9-. + * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera. */ progress { display: inline-block; @@ -4205,16 +4205,16 @@ progress { /* 2 */ } -/** - * Remove the default vertical scrollbar in IE. +/** + * Remove the default vertical scrollbar in IE. */ textarea { overflow: auto; } -/** - * 1. Add the correct box sizing in IE 10-. - * 2. Remove the padding in IE 10-. +/** + * 1. Add the correct box sizing in IE 10-. + * 2. Remove the padding in IE 10-. */ [type="checkbox"], [type="radio"] { @@ -4224,17 +4224,17 @@ textarea { /* 2 */ } -/** - * Correct the cursor style of increment and decrement buttons in Chrome. +/** + * Correct the cursor style of increment and decrement buttons in Chrome. */ [type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { height: auto; } -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. */ [type="search"] { -webkit-appearance: textfield; @@ -4243,17 +4243,17 @@ textarea { /* 2 */ } -/** - * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. +/** + * Remove the inner padding and cancel buttons in Chrome and Safari on macOS. */ [type="search"]::-webkit-search-cancel-button, [type="search"]::-webkit-search-decoration { -webkit-appearance: none; } -/** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. */ ::-webkit-file-upload-button { -webkit-appearance: button; @@ -4262,44 +4262,44 @@ textarea { /* 2 */ } -/* Interactive +/* Interactive ========================================================================== */ -/* - * Add the correct display in IE 9-. - * 1. Add the correct display in Edge, IE, and Firefox. +/* + * Add the correct display in IE 9-. + * 1. Add the correct display in Edge, IE, and Firefox. */ details, menu { display: block; } -/* - * Add the correct display in all browsers. +/* + * Add the correct display in all browsers. */ summary { display: list-item; } -/* Scripting +/* Scripting ========================================================================== */ -/** - * Add the correct display in IE 9-. +/** + * Add the correct display in IE 9-. */ canvas { display: inline-block; } -/** - * Add the correct display in IE. +/** + * Add the correct display in IE. */ template { display: none; } -/* Hidden +/* Hidden ========================================================================== */ -/** - * Add the correct display in IE 10-. +/** + * Add the correct display in IE 10-. */ [hidden] { display: none; @@ -4560,8 +4560,8 @@ video.responsive-video { position: fixed !important; } -/********************* - Transition Classes +/********************* + Transition Classes **********************/ ul.staggered-list li { opacity: 0; @@ -4573,8 +4573,8 @@ ul.staggered-list li { transform-origin: 0 50%; } -/********************* - Media Query Classes +/********************* + Media Query Classes **********************/ @media only screen and (max-width: 600px) { .hide-on-small-only, .hide-on-small-and-down { @@ -5012,8 +5012,8 @@ td, th { } } -/******************* - Utility Classes +/******************* + Utility Classes *******************/ .hide { display: none !important; @@ -7193,7 +7193,7 @@ button.btn-floating { .btn-flat { box-shadow: none; background-color: transparent; - color: var(--vscode-button-background); + color: var(--vscode-button-foreground); cursor: pointer; -webkit-transition: background-color .2s; transition: background-color .2s; @@ -7319,13 +7319,13 @@ body.keyboard-focused .dropdown-content li:focus { cursor: pointer; } -/*! - * Waves v0.6.0 - * http://fian.my.id/Waves - * - * Copyright 2014 Alfiana E. Sibuea and other contributors - * Released under the MIT license - * https://github.com/fians/Waves/blob/master/LICENSE +/*! + * Waves v0.6.0 + * http://fian.my.id/Waves + * + * Copyright 2014 Alfiana E. Sibuea and other contributors + * Released under the MIT license + * https://github.com/fians/Waves/blob/master/LICENSE */ .waves-effect { position: relative; @@ -7792,7 +7792,7 @@ label { color: #9e9e9e; } -/* Text Inputs + Textarea +/* Text Inputs + Textarea ========================================================================== */ /* Style Placeholders */ ::-webkit-input-placeholder { @@ -8396,7 +8396,7 @@ textarea.materialize-textarea { min-height: 18px; } -/* Radio Buttons +/* Radio Buttons ========================================================================== */ [type="radio"]:not(:checked), [type="radio"]:checked { @@ -8518,7 +8518,7 @@ textarea.materialize-textarea { border-color: #949494; } -/* Checkboxes +/* Checkboxes ========================================================================== */ /* Remove default checkbox */ [type="checkbox"]:not(:checked), @@ -8718,7 +8718,7 @@ textarea.materialize-textarea { border-color: #949494; } -/* Switch +/* Switch ========================================================================== */ .switch, .switch * { @@ -8814,7 +8814,7 @@ input[type=checkbox]:not(:disabled).tabbed:focus ~ .lever::before { background-color: #949494; } -/* Select Field +/* Select Field ========================================================================== */ select { display: none; @@ -8970,7 +8970,7 @@ body.keyboard-focused .select-dropdown.dropdown-content li:focus { padding-left: 1rem; } -/* File Input +/* File Input ========================================================================== */ .file-field { position: relative; @@ -9014,7 +9014,7 @@ body.keyboard-focused .select-dropdown.dropdown-content li:focus { display: none; } -/* Range +/* Range ========================================================================== */ .range-field { position: relative; @@ -9172,8 +9172,8 @@ input[type=range]::-ms-thumb { box-shadow: 0 0 0 10px rgba(39, 169, 225, 0.26); } -/*************** - Nav List +/*************** + Nav List ***************/ .table-of-contents.fixed { position: fixed; @@ -9273,7 +9273,7 @@ input[type=range]::-ms-thumb { } .sidenav li > a.btn-flat { - color: var(--vscode-button-background); + color: var(--vscode-button-foreground); } .sidenav li > a.btn:hover, .sidenav li > a.btn-large:hover, .sidenav li > a.btn-small:hover, .sidenav li > a.btn-large:hover { @@ -9429,30 +9429,30 @@ input[type=range]::-ms-thumb { display: none; } -/* - @license - Copyright (c) 2014 The Polymer Project Authors. All rights reserved. - This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt - The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt - The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt - Code distributed by Google as part of the polymer project is also - subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +/* + @license + Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ /**************************/ /* STYLES FOR THE SPINNER */ /**************************/ -/* - * Constants: - * STROKEWIDTH = 3px - * ARCSIZE = 270 degrees (amount of circle the arc takes up) - * ARCTIME = 1333ms (time it takes to expand and contract arc) - * ARCSTARTROT = 216 degrees (how much the start location of the arc - * should rotate each time, 216 gives us a - * 5 pointed star shape (it's 360/5 * 3). - * For a 7 pointed star, we might do - * 360/7 * 3 = 154.286) - * CONTAINERWIDTH = 28px - * SHRINK_TIME = 400ms +/* + * Constants: + * STROKEWIDTH = 3px + * ARCSIZE = 270 degrees (amount of circle the arc takes up) + * ARCTIME = 1333ms (time it takes to expand and contract arc) + * ARCSTARTROT = 216 degrees (how much the start location of the arc + * should rotate each time, 216 gives us a + * 5 pointed star shape (it's 360/5 * 3). + * For a 7 pointed star, we might do + * 360/7 * 3 = 154.286) + * CONTAINERWIDTH = 28px + * SHRINK_TIME = 400ms */ .preloader-wrapper { display: inline-block; @@ -9518,18 +9518,18 @@ input[type=range]::-ms-thumb { border-color: #0f9d58; } -/** - * IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee): - * - * iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't - * guarantee that the animation will start _exactly_ after that value. So we avoid using - * animation-delay and instead set custom keyframes for each color (as redundant as it - * seems). - * - * We write out each animation in full (instead of separating animation-name, - * animation-duration, etc.) because under the polyfill, Safari does not recognize those - * specific properties properly, treats them as -webkit-animation, and overrides the - * other animation rules. See https://github.com/Polymer/platform/issues/53. +/** + * IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee): + * + * iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't + * guarantee that the animation will start _exactly_ after that value. So we avoid using + * animation-delay and instead set custom keyframes for each color (as redundant as it + * seems). + * + * We write out each animation in full (instead of separating animation-name, + * animation-duration, etc.) because under the polyfill, Safari does not recognize those + * specific properties properly, treats them as -webkit-animation, and overrides the + * other animation rules. See https://github.com/Polymer/platform/issues/53. */ .active .spinner-layer.spinner-blue { /* durations: 4 * ARCTIME */ @@ -9794,9 +9794,9 @@ input[type=range]::-ms-thumb { } } -/** - * Patch the gap that appear between the two adjacent div.circle-clipper while the - * spinner is rotating (appears on Chrome 38, Safari 7.1, and IE 11). +/** + * Patch the gap that appear between the two adjacent div.circle-clipper while the + * spinner is rotating (appears on Chrome 38, Safari 7.1, and IE 11). */ .gap-patch { position: absolute; @@ -10163,10 +10163,10 @@ input[type=range]::-ms-thumb { visibility: visible; -webkit-animation: pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite; animation: pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite; - -webkit-transition: opacity .3s, visibility 0s 1s, -webkit-transform .3s; - transition: opacity .3s, visibility 0s 1s, -webkit-transform .3s; - transition: opacity .3s, transform .3s, visibility 0s 1s; - transition: opacity .3s, transform .3s, visibility 0s 1s, -webkit-transform .3s; + -webkit-transition: opacity .3s, visibility 0s 1s, -webkit-transform .3s; + transition: opacity .3s, visibility 0s 1s, -webkit-transform .3s; + transition: opacity .3s, transform .3s, visibility 0s 1s; + transition: opacity .3s, transform .3s, visibility 0s 1s, -webkit-transform .3s; } .tap-target { @@ -10218,10 +10218,10 @@ input[type=range]::-ms-thumb { .tap-target-wave::after { visibility: hidden; - -webkit-transition: opacity .3s, visibility 0s, -webkit-transform .3s; - transition: opacity .3s, visibility 0s, -webkit-transform .3s; - transition: opacity .3s, transform .3s, visibility 0s; - transition: opacity .3s, transform .3s, visibility 0s, -webkit-transform .3s; + -webkit-transition: opacity .3s, visibility 0s, -webkit-transform .3s; + transition: opacity .3s, visibility 0s, -webkit-transform .3s; + transition: opacity .3s, transform .3s, visibility 0s; + transition: opacity .3s, transform .3s, visibility 0s, -webkit-transform .3s; z-index: -1; } diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Cache/OptionSetCacheItem.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Cache/OptionSetCacheItem.cs index 6b37184..c4f533d 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Cache/OptionSetCacheItem.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Cache/OptionSetCacheItem.cs @@ -8,7 +8,7 @@ public class OptionSetCacheItem : IHaveCacheKey, IParseCacheKey, { public OptionSetCacheItem() { - Key = new Func(() => { return $"{EntityLogicalName}.{LogicalName}"; }); + Key = new Func(() => { return EntityLogicalName + (!string.IsNullOrEmpty(EntityLogicalName) ? "." : "") + LogicalName; }); ParseKey = new Func((entity, optionSet) => { EntityLogicalName = entity; LogicalName = optionSet; return Key(); }); ParseMetadata = new Action(m => { diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Cache/SdkMessageCacheItem.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Cache/SdkMessageCacheItem.cs index 8743320..ccfa3f7 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Cache/SdkMessageCacheItem.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Cache/SdkMessageCacheItem.cs @@ -12,7 +12,6 @@ public SdkMessageCacheItem() ParseMetadata = new Action(m => { Metadata = m; - IsPrivate = m.IsPrivate; MessageName = m.Name; }); } @@ -24,7 +23,6 @@ public SdkMessageCacheItem() public SdkMessage Metadata { get; private set; } public string MessageName { get; set; } - public bool IsPrivate { get; set; } public string GeneratedTypeName { get; set; } } } diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/CompositeFilterService.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/CompositeFilterService.cs index b262c85..1097f5e 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/CompositeFilterService.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/CompositeFilterService.cs @@ -58,6 +58,7 @@ private void InitializeFilters() public override bool GenerateAttribute(AttributeMetadata attributeMetadata, IServiceProvider services) { + bool baseResponse = base.GenerateAttribute(attributeMetadata, services); bool whitelist, blacklist = false; whitelist = _whitelistFilters.Any(filter => filter.GenerateAttribute(attributeMetadata, services)); @@ -68,10 +69,13 @@ public override bool GenerateAttribute(AttributeMetadata attributeMetadata, ISer } else { - if (Configuration.Filtering.HasWhitelist && Configuration.Filtering.Whitelist.Filter == WhitelistFilter.Exclusive) + if (!baseResponse) + return false; + + if (Configuration.Filtering.HasWhitelist && Configuration.Filtering.Whitelist.Filter == WhitelistFilter.Exclusive && !DynamicsMetadataCache.Entities.HasBy(attributeMetadata.EntityLogicalName)) return false; - blacklist = _blacklistFilters.Any(filter => filter.GenerateAttribute(attributeMetadata, services)); + blacklist = _blacklistFilters.All(filter => filter.GenerateAttribute(attributeMetadata, services)); if (!blacklist) { @@ -84,6 +88,7 @@ public override bool GenerateAttribute(AttributeMetadata attributeMetadata, ISer public override bool GenerateEntity(EntityMetadata entityMetadata, IServiceProvider services) { + bool baseResponse = base.GenerateEntity(entityMetadata, services); bool whitelist, blacklist = false; whitelist = _whitelistFilters.Any(filter => filter.GenerateEntity(entityMetadata, services)); @@ -94,10 +99,13 @@ public override bool GenerateEntity(EntityMetadata entityMetadata, IServiceProvi } else { + if (!baseResponse) + return false; + if (Configuration.Filtering.HasWhitelist && Configuration.Filtering.Whitelist.Filter == WhitelistFilter.Exclusive) return false; - blacklist = _blacklistFilters.Any(filter => filter.GenerateEntity(entityMetadata, services)); + blacklist = _blacklistFilters.All(filter => filter.GenerateEntity(entityMetadata, services)); if (!blacklist) { @@ -110,13 +118,17 @@ public override bool GenerateEntity(EntityMetadata entityMetadata, IServiceProvi public override bool GenerateOption(OptionMetadata optionMetadata, IServiceProvider services) { + bool baseResponse = base.GenerateOption(optionMetadata, services); bool whitelist, blacklist = false; whitelist = _whitelistFilters.Any(filter => filter.GenerateOption(optionMetadata, services)); if (!whitelist) { - blacklist = _blacklistFilters.Any(filter => filter.GenerateOption(optionMetadata, services)); + if (!baseResponse) + return false; + + blacklist = _blacklistFilters.All(filter => filter.GenerateOption(optionMetadata, services)); } return whitelist || blacklist; @@ -124,6 +136,7 @@ public override bool GenerateOption(OptionMetadata optionMetadata, IServiceProvi public override bool GenerateOptionSet(OptionSetMetadataBase optionSetMetadata, IServiceProvider services) { + bool baseResponse = base.GenerateOptionSet(optionSetMetadata, services); bool whitelist, blacklist = false; whitelist = _whitelistFilters.Any(filter => filter.GenerateOptionSet(optionSetMetadata, services)); @@ -134,10 +147,13 @@ public override bool GenerateOptionSet(OptionSetMetadataBase optionSetMetadata, } else { + if (!baseResponse) + return false; + if (Configuration.Filtering.HasWhitelist && Configuration.Filtering.Whitelist.Filter == WhitelistFilter.Exclusive) return false; - blacklist = _blacklistFilters.Any(filter => filter.GenerateOptionSet(optionSetMetadata, services)); + blacklist = _blacklistFilters.All(filter => filter.GenerateOptionSet(optionSetMetadata, services)); if (!blacklist) { @@ -150,6 +166,7 @@ public override bool GenerateOptionSet(OptionSetMetadataBase optionSetMetadata, public override bool GenerateRelationship(RelationshipMetadataBase relationshipMetadata, EntityMetadata otherEntityMetadata, IServiceProvider services) { + bool baseResponse = base.GenerateRelationship(relationshipMetadata, otherEntityMetadata, services); bool whitelist, blacklist = false; whitelist = _whitelistFilters.Any(filter => filter.GenerateRelationship(relationshipMetadata, otherEntityMetadata, services)); @@ -160,10 +177,13 @@ public override bool GenerateRelationship(RelationshipMetadataBase relationshipM } else { + if (!baseResponse) + return false; + if (Configuration.Filtering.HasWhitelist && Configuration.Filtering.Whitelist.Filter == WhitelistFilter.Exclusive) return false; - blacklist = _blacklistFilters.Any(filter => filter.GenerateRelationship(relationshipMetadata, otherEntityMetadata, services)); + blacklist = _blacklistFilters.All(filter => filter.GenerateRelationship(relationshipMetadata, otherEntityMetadata, services)); if (!blacklist) { @@ -176,6 +196,7 @@ public override bool GenerateRelationship(RelationshipMetadataBase relationshipM public override bool GenerateSdkMessage(SdkMessage sdkMessage, IServiceProvider services) { + bool baseResponse = base.GenerateSdkMessage(sdkMessage, services); bool whitelist, blacklist = false; whitelist = _whitelistFilters.Any(filter => filter.GenerateSdkMessage(sdkMessage, services)); @@ -186,10 +207,13 @@ public override bool GenerateSdkMessage(SdkMessage sdkMessage, IServiceProvider } else { + if (!baseResponse) + return false; + if (Configuration.Filtering.HasWhitelist && Configuration.Filtering.Whitelist.Filter == WhitelistFilter.Exclusive) return false; - blacklist = _blacklistFilters.Any(filter => filter.GenerateSdkMessage(sdkMessage, services)); + blacklist = _blacklistFilters.All(filter => filter.GenerateSdkMessage(sdkMessage, services)); if (!blacklist) { @@ -202,6 +226,7 @@ public override bool GenerateSdkMessage(SdkMessage sdkMessage, IServiceProvider public override bool GenerateSdkMessagePair(SdkMessagePair sdkMessagePair, IServiceProvider services) { + bool baseResponse = base.GenerateSdkMessagePair(sdkMessagePair, services); bool whitelist, blacklist = false; whitelist = _whitelistFilters.Any(filter => filter.GenerateSdkMessagePair(sdkMessagePair, services)); @@ -212,10 +237,13 @@ public override bool GenerateSdkMessagePair(SdkMessagePair sdkMessagePair, IServ } else { + if (!baseResponse) + return false; + if (Configuration.Filtering.HasWhitelist && Configuration.Filtering.Whitelist.Filter == WhitelistFilter.Exclusive) return false; - blacklist = _blacklistFilters.Any(filter => filter.GenerateSdkMessagePair(sdkMessagePair, services)); + blacklist = _blacklistFilters.All(filter => filter.GenerateSdkMessagePair(sdkMessagePair, services)); if (!blacklist) { @@ -228,13 +256,17 @@ public override bool GenerateSdkMessagePair(SdkMessagePair sdkMessagePair, IServ public override bool GenerateServiceContext(IServiceProvider services) { + bool baseResponse = base.GenerateServiceContext(services); bool whitelist, blacklist = false; whitelist = _whitelistFilters.Any(filter => filter.GenerateServiceContext(services)); if (!whitelist) { - blacklist = _blacklistFilters.Any(filter => filter.GenerateServiceContext(services)); + if (!baseResponse) + return false; + + blacklist = _blacklistFilters.All(filter => filter.GenerateServiceContext(services)); } return whitelist || blacklist; diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/CompositeNamingService.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/CompositeNamingService.cs index a3b4fd3..88ab426 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/CompositeNamingService.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/CompositeNamingService.cs @@ -30,23 +30,26 @@ internal void InitalizeNamers() public override string GetNameForAttribute(EntityMetadata entityMetadata, AttributeMetadata attributeMetadata, IServiceProvider services) { string returnValue = string.Empty; + string defaultValue = base.GetNameForAttribute(entityMetadata, attributeMetadata, services); foreach (var namer in _namers) { Trace.Debug($"Executing naming rule {nameof(GetNameForAttribute)} using {namer.GetType().FullName}"); returnValue = namer.GetNameForAttribute(entityMetadata, attributeMetadata, services); + } - if (!string.IsNullOrEmpty(returnValue)) - { - var cacheItem = DynamicsMetadataCache.Attributes.GetOrParse(attributeMetadata); + if (string.IsNullOrEmpty(returnValue)) + { + returnValue = defaultValue; + } - if (cacheItem != null) - cacheItem.GeneratedTypeName = returnValue; + var cacheItem = DynamicsMetadataCache.Attributes.GetOrParse(attributeMetadata); - DynamicsMetadataCache.Attributes.Set(cacheItem); - } - } + if (cacheItem != null) + cacheItem.GeneratedTypeName = returnValue; + + DynamicsMetadataCache.Attributes.Set(cacheItem); return returnValue; } @@ -54,23 +57,26 @@ public override string GetNameForAttribute(EntityMetadata entityMetadata, Attrib public override string GetNameForEntity(EntityMetadata entityMetadata, IServiceProvider services) { string returnValue = string.Empty; + string defaultValue = base.GetNameForEntity(entityMetadata, services); foreach (var namer in _namers) { Trace.Debug($"Executing naming rule {nameof(GetNameForEntity)} using {namer.GetType().FullName}"); returnValue = namer.GetNameForEntity(entityMetadata, services); + } - if (!string.IsNullOrEmpty(returnValue)) - { - var cacheItem = DynamicsMetadataCache.Entities.GetOrParse(entityMetadata); + if (string.IsNullOrEmpty(returnValue)) + { + returnValue = defaultValue; + } - if (cacheItem != null) - cacheItem.GeneratedTypeName = returnValue; + var cacheItem = DynamicsMetadataCache.Entities.GetOrParse(entityMetadata); - DynamicsMetadataCache.Entities.Set(cacheItem); - } - } + if (cacheItem != null) + cacheItem.GeneratedTypeName = returnValue; + + DynamicsMetadataCache.Entities.Set(cacheItem); return returnValue; } @@ -78,23 +84,26 @@ public override string GetNameForEntity(EntityMetadata entityMetadata, IServiceP public override string GetNameForEntitySet(EntityMetadata entityMetadata, IServiceProvider services) { string returnValue = string.Empty; + string defaultValue = base.GetNameForEntitySet(entityMetadata, services); foreach (var namer in _namers) { Trace.Debug($"Executing naming rule {nameof(GetNameForEntity)} using {namer.GetType().FullName}"); returnValue = namer.GetNameForEntity(entityMetadata, services); + } - if (!string.IsNullOrEmpty(returnValue)) - { - var cacheItem = DynamicsMetadataCache.Entities.GetOrParse(entityMetadata); + if (string.IsNullOrEmpty(returnValue)) + { + returnValue = defaultValue; + } - if (cacheItem != null) - cacheItem.GeneratedSetName = returnValue; + var cacheItem = DynamicsMetadataCache.Entities.GetOrParse(entityMetadata); - DynamicsMetadataCache.Entities.Set(cacheItem); - } - } + if (cacheItem != null) + cacheItem.GeneratedSetName = returnValue; + + DynamicsMetadataCache.Entities.Set(cacheItem); return returnValue; } @@ -109,17 +118,19 @@ public override string GetNameForMessagePair(SdkMessagePair messagePair, IServic Trace.Debug($"Executing naming rule {nameof(GetNameForMessagePair)} using {namer.GetType().FullName}"); returnValue = namer.GetNameForMessagePair(messagePair, services); + } - if (!string.IsNullOrEmpty(returnValue)) - { - var cacheItem = DynamicsMetadataCache.SdkMessagePairs.GetOrParse(messagePair); + if (string.IsNullOrEmpty(returnValue)) + { + returnValue = defaultValue; + } - if (cacheItem != null) - cacheItem.GeneratedTypeName = returnValue; + var cacheItem = DynamicsMetadataCache.SdkMessagePairs.GetOrParse(messagePair); - DynamicsMetadataCache.SdkMessagePairs.Set(cacheItem); - } - } + if (cacheItem != null) + cacheItem.GeneratedTypeName = returnValue; + + DynamicsMetadataCache.SdkMessagePairs.Set(cacheItem); return returnValue; } @@ -134,17 +145,19 @@ public override string GetNameForOption(OptionSetMetadataBase optionSetMetadata, Trace.Debug($"Executing naming rule {nameof(GetNameForOption)} using {namer.GetType().FullName}"); returnValue = namer.GetNameForOption(optionSetMetadata, optionMetadata, services); + } - if (!string.IsNullOrEmpty(returnValue)) - { - var cacheItem = DynamicsMetadataCache.Options.GetOrParse(optionMetadata); + if (string.IsNullOrEmpty(returnValue)) + { + returnValue = defaultValue; + } - if (cacheItem != null) - cacheItem.GeneratedTypeName = returnValue; + var cacheItem = DynamicsMetadataCache.Options.GetOrParse(optionMetadata); - DynamicsMetadataCache.Options.Set(cacheItem); - } - } + if (cacheItem != null) + cacheItem.GeneratedTypeName = returnValue; + + DynamicsMetadataCache.Options.Set(cacheItem); return returnValue; } @@ -159,17 +172,19 @@ public override string GetNameForOptionSet(EntityMetadata entityMetadata, Option Trace.Debug($"Executing naming rule {nameof(GetNameForOptionSet)} using {namer.GetType().FullName}"); returnValue = namer.GetNameForOptionSet(entityMetadata, optionSetMetadata, services); + } - if (!string.IsNullOrEmpty(returnValue)) - { - var cacheItem = DynamicsMetadataCache.OptionSets.GetOrParse(optionSetMetadata); + if (string.IsNullOrEmpty(returnValue)) + { + returnValue = defaultValue; + } - if (cacheItem != null) - cacheItem.GeneratedTypeName = returnValue; + var cacheItem = DynamicsMetadataCache.OptionSets.GetOrParse(optionSetMetadata); - DynamicsMetadataCache.OptionSets.Set(cacheItem); - } - } + if (cacheItem != null) + cacheItem.GeneratedTypeName = returnValue; + + DynamicsMetadataCache.OptionSets.Set(cacheItem); return returnValue; } @@ -184,17 +199,19 @@ public override string GetNameForRelationship(EntityMetadata entityMetadata, Rel Trace.Debug($"Executing naming rule {nameof(GetNameForRelationship)} using {namer.GetType().FullName}"); returnValue = namer.GetNameForRelationship(entityMetadata, relationshipMetadata, reflexiveRole, services); + } - if (!string.IsNullOrEmpty(returnValue)) - { - var cacheItem = DynamicsMetadataCache.Relationships.GetOrParse(relationshipMetadata); + if (string.IsNullOrEmpty(returnValue)) + { + returnValue = defaultValue; + } - if (cacheItem != null) - cacheItem.GeneratedTypeName = returnValue; + var cacheItem = DynamicsMetadataCache.Relationships.GetOrParse(relationshipMetadata); - DynamicsMetadataCache.Relationships.Set(cacheItem); - } - } + if (cacheItem != null) + cacheItem.GeneratedTypeName = returnValue; + + DynamicsMetadataCache.Relationships.Set(cacheItem); return string.IsNullOrEmpty(returnValue) ? defaultValue : returnValue; } @@ -209,17 +226,19 @@ public override string GetNameForRequestField(SdkMessageRequest request, SdkMess Trace.Debug($"Executing naming rule {nameof(GetNameForRequestField)} using {namer.GetType().FullName}"); returnValue = namer.GetNameForRequestField(request, requestField, services); + } - if (!string.IsNullOrEmpty(returnValue)) - { - var cacheItem = DynamicsMetadataCache.SdkMessagePairs.GetOrParse(request.MessagePair); + if (string.IsNullOrEmpty(returnValue)) + { + returnValue = defaultValue; + } - if (cacheItem != null) - cacheItem.GeneratedRequestTypeName = returnValue; + var cacheItem = DynamicsMetadataCache.SdkMessagePairs.GetOrParse(request.MessagePair); - DynamicsMetadataCache.SdkMessagePairs.Set(cacheItem); - } - } + if (cacheItem != null) + cacheItem.GeneratedRequestTypeName = returnValue; + + DynamicsMetadataCache.SdkMessagePairs.Set(cacheItem); return string.IsNullOrEmpty(returnValue) ? defaultValue : returnValue; } diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/FilterListElement.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/FilterListElement.cs index fec598d..ef88486 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/FilterListElement.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/FilterListElement.cs @@ -54,7 +54,7 @@ internal FilterListStrategy Strategy internal bool HasSolutionFilters => Solutions.Count(s => !string.IsNullOrEmpty(s.SolutionName)) > 0; internal bool HasCustomizationFilter => Customizations?.CustomizationStrategy != CustomizationStrategy.Default; - [ConfigurationProperty("Entities")] + [ConfigurationProperty("Entities", IsRequired = false)] [ConfigurationCollection(typeof(EntityListElementCollection), AddItemName = "add", ClearItemsName = "clear", @@ -65,7 +65,7 @@ public EntityListElementCollection Entities set => base["Entities"] = value; } - [ConfigurationProperty("Attributes")] + [ConfigurationProperty("Attributes", IsRequired = false)] [ConfigurationCollection(typeof(AttributeListElementCollection), AddItemName = "add", ClearItemsName = "clear", @@ -76,7 +76,7 @@ public AttributeListElementCollection Attributes set => base["Attributes"] = value; } - [ConfigurationProperty("OptionSets")] + [ConfigurationProperty("OptionSets", IsRequired = false)] [ConfigurationCollection(typeof(OptionSetListElementCollection), AddItemName = "add", ClearItemsName = "clear", @@ -87,7 +87,7 @@ public OptionSetListElementCollection OptionSets set => base["OptionSets"] = value; } - [ConfigurationProperty("Filters")] + [ConfigurationProperty("Filters", IsRequired = false)] [ConfigurationCollection(typeof(FilterListElementCollection))] public FilterListElementCollection Filters { @@ -95,7 +95,7 @@ public FilterListElementCollection Filters set => base["Filters"] = value; } - [ConfigurationProperty("Solutions")] + [ConfigurationProperty("Solutions", IsRequired = false)] [ConfigurationCollection(typeof(SolutionFilterElementCollection), AddItemName = "add", ClearItemsName = "clear", @@ -106,7 +106,7 @@ public SolutionFilterElementCollection Solutions set => base["Solutions"] = value; } - [ConfigurationProperty("Customizations")] + [ConfigurationProperty("Customizations", IsRequired = false)] public CustomizationFilterElement Customizations { get => (CustomizationFilterElement)base["Customizations"]; diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/FilterListElementCollection.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/FilterListElementCollection.cs index f4c8ebf..772f53a 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/FilterListElementCollection.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/FilterListElementCollection.cs @@ -15,6 +15,11 @@ public class FilterListElementCollection : MultipleConfigurationElementCollectio { "optionSet", typeof(AllowsEntityRegExElement) } }; + protected override void OnElementCreated(string elementName, RegExFilterElement element) + { + element.Filter = elementName == "entity" ? FilterMember.Entity : elementName == "attribute" ? FilterMember.Attribute : elementName == "optionSet" ? FilterMember.OptionSet : element.Filter; + } + /// protected override object GetElementKey(RegExFilterElement element) { diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/RegExFilterElement.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/RegExFilterElement.cs index ad04c06..3efd02b 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/RegExFilterElement.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/RegExFilterElement.cs @@ -39,6 +39,6 @@ public bool IgnoreCase set => this["ignoreCase"] = value; } - public FilterMember Filter { get; private set; } + public FilterMember Filter { get; set; } } } \ No newline at end of file diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/RequiresEntityRegExFilterElement.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/RequiresEntityRegExFilterElement.cs index 453d200..8c7e49a 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/RequiresEntityRegExFilterElement.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Filter/RequiresEntityRegExFilterElement.cs @@ -8,7 +8,7 @@ public AllowsEntityRegExElement() : base(FilterMember.Entity) { } public AllowsEntityRegExElement(string expression) : base(FilterMember.Entity, expression) { } public AllowsEntityRegExElement(string expression, bool ignoreCase) : base(FilterMember.Entity, expression, ignoreCase) { } - [ConfigurationProperty("entity", IsRequired = true)] + [ConfigurationProperty("entity", IsRequired = false)] public string Entity { get => (string)this["entity"]; diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Generation/CodeGenerationConfigurationExtensions.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Generation/CodeGenerationConfigurationExtensions.cs index 1e2f6c8..2eb61e8 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Generation/CodeGenerationConfigurationExtensions.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/Generation/CodeGenerationConfigurationExtensions.cs @@ -127,7 +127,7 @@ public static CodeGenerationBehaviorElement GetBehavior(this CodeGenerationBehav public static bool HasBehavior(this CodeGenerationBehaviorsCollection @this, string name) { - return @this.Count(b => b.Name == name && b.IsEnabled) > 0; + return @this.Count(b => String.Compare(b.Name, name, true) == 0 && b.IsEnabled) > 0; } } } diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/MultipleConfigurationElementCollection.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/MultipleConfigurationElementCollection.cs index 66c3787..f787ec5 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/MultipleConfigurationElementCollection.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Configuration/MultipleConfigurationElementCollection.cs @@ -21,17 +21,28 @@ protected MultipleConfigurationElementCollection() } protected abstract Dictionary ElementNameMappings { get; } - public override ConfigurationElementCollectionType CollectionType => ConfigurationElementCollectionType.BasicMap; + protected virtual void OnElementCreated(string elementName, T element) + { + } + protected override ConfigurationElement CreateNewElement() { + T returnElement; + if (!string.IsNullOrEmpty(_elementName) && ElementNameMappings[_elementName] != null) { - return (ConfigurationElement)Activator.CreateInstance(ElementNameMappings[_elementName]); + returnElement = (T)Activator.CreateInstance(ElementNameMappings[_elementName]); + } + else + { + returnElement = new T(); } - return new T(); + OnElementCreated(_elementName, returnElement); + + return returnElement; } protected override object GetElementKey(ConfigurationElement element) diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/CrmSvcUtil.exe.config b/resources/tools/CloudSmith.Cds.CrmSvcUtil/CrmSvcUtil.exe.config index 2203ddc..c34887d 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/CrmSvcUtil.exe.config +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/CrmSvcUtil.exe.config @@ -14,9 +14,10 @@ + + - diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Filter/FilterListFilterService.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Filter/FilterListFilterService.cs index 20d158e..8bbaece 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Filter/FilterListFilterService.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Filter/FilterListFilterService.cs @@ -171,7 +171,7 @@ public override bool GenerateAttribute(AttributeMetadata attributeMetadata, ISer else { // We said that we want to generate the entity, so by default we'll cache the attributes for the entity as well. - if (DynamicsMetadataCache.Entities.HasBy(attributeMetadata.EntityLogicalName)) + if (DynamicsMetadataCache.Entities.HasBy(attributeMetadata.EntityLogicalName) && whitelistConfig.Filter == WhitelistFilter.Inclusive) { DynamicsMetadataCache.Attributes.AddBy(attributeMetadata); } diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Generation/OptionSetEnumCustomizationService.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Generation/OptionSetEnumCustomizationService.cs index 66a61f6..3c1a5ff 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Generation/OptionSetEnumCustomizationService.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Generation/OptionSetEnumCustomizationService.cs @@ -5,6 +5,7 @@ using CloudSmith.Cds.CrmSvcUtil.Cache; using CloudSmith.Cds.CrmSvcUtil.Configuration; using CloudSmith.Cds.CrmSvcUtil.Configuration.Generation; +using Microsoft.Crm.Services.Utility; using Microsoft.Xrm.Sdk.Metadata; namespace CloudSmith.Cds.CrmSvcUtil.Generation @@ -15,11 +16,18 @@ public OptionSetEnumCustomizationService(BaseCustomizationService service) : bas public OptionSetEnumCustomizationService() : this(ServiceExtensionsConfigurationSection.Create()) { } public OptionSetEnumCustomizationService(IServiceExtensionsConfiguration configuration) : base(configuration) { } + private static IServiceProvider serviceProvider; + /// /// Remove the unnecessary classes that we generated for entities. /// public override void CustomizeCodeDom(CodeCompileUnit codeUnit, IServiceProvider services) { + if (serviceProvider == null) + { + serviceProvider = services; + } + if (!Configuration.CodeGeneration.Behaviors.HasBehavior("TranslateOptionSetsAsEnums")) return; @@ -43,9 +51,15 @@ public override void CustomizeCodeDom(CodeCompileUnit codeUnit, IServiceProvider { if (member is CodeMemberProperty) { + var codeProperty = member as CodeMemberProperty; var attributeMetadata = entity.Attributes.FirstOrDefault(a => a.GeneratedTypeName == member.Name); - TransformOptionSets(member, entity, attributeMetadata); + if (attributeMetadata != null + && member.Name.ToLower() != "statecode" + && codeProperty.Type.BaseType == "Microsoft.Xrm.Sdk.OptionSetValue") + { + TransformOptionSets(codeProperty, entity, attributeMetadata); + } } } } @@ -58,32 +72,48 @@ private static EntityCacheItem GetSchemaEntity(string name) return DynamicsMetadataCache.Entities.FirstOrDefault(e => e.Value?.GeneratedTypeName == name).Value; } - private static void TransformOptionSets(CodeTypeMember member, EntityCacheItem entity, AttributeCacheItem attribute) + private static void TransformOptionSets(CodeMemberProperty member, EntityCacheItem entity, AttributeCacheItem attribute) { - var codeProperty = (CodeMemberProperty)member; - - if (member.Name.ToLower() == "statecode" || codeProperty.Type.BaseType != "Microsoft.Xrm.Sdk.OptionSetValue") return; - - OptionSetCacheItem optionSet = null; AttributeMetadata attributeMetadata = attribute.Metadata; if (entity != null && attributeMetadata != null) { if (attributeMetadata is EnumAttributeMetadata) { - FixEnums(codeProperty, (EnumAttributeMetadata)attributeMetadata, optionSet); + string typeName; + EnumAttributeMetadata enumMetadata = attributeMetadata as EnumAttributeMetadata; + OptionSetCacheItem optionSet = DynamicsMetadataCache.OptionSets.GetBy(entity.LogicalName, enumMetadata.OptionSet.Name); + + if (optionSet == null) + { + optionSet = DynamicsMetadataCache.OptionSets.GetBy("*", enumMetadata.OptionSet.Name); + } + + if (optionSet != null) + { + typeName = optionSet.GeneratedTypeName; + } + else + { + var namingService = (INamingService)serviceProvider.GetService(typeof(INamingService)); + + typeName = namingService.GetNameForOptionSet(entity.Metadata, enumMetadata.OptionSet, serviceProvider); + } + + FixEnums(member, enumMetadata, typeName); } else { - codeProperty.Type = new CodeTypeReference("int?"); + member.Type = new CodeTypeReference("int?"); } } } - private static void FixEnums(CodeMemberProperty codeProperty, EnumAttributeMetadata listAttribute, OptionSetCacheItem optionSet) + private static void FixEnums(CodeMemberProperty codeProperty, EnumAttributeMetadata listAttribute, string typeName) { //TODO: refator this method to also work in VB or F# - codeProperty.Type = new CodeTypeReference(optionSet.GeneratedTypeName + "?"); + codeProperty.Type = new CodeTypeReference(typeName.EndsWith("?") ? typeName : typeName + "?"); + if (codeProperty.HasSet) { if (codeProperty.SetStatements[1].GetType() == typeof(CodeConditionStatement)) @@ -113,7 +143,7 @@ private static void FixEnums(CodeMemberProperty codeProperty, EnumAttributeMetad string.Format( "var ret = this.GetAttributeValue(\"{1}\");" + Environment.NewLine + "\t\t\t\treturn (ret!=null ? ({0}?)ret.Value : ({0}?)null);", - optionSet.GeneratedTypeName, listAttribute.LogicalName) + typeName, listAttribute.LogicalName) )); } } diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Naming/BaseNamingService.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Naming/BaseNamingService.cs index 90f14b0..123d268 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Naming/BaseNamingService.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Naming/BaseNamingService.cs @@ -4,6 +4,7 @@ using Microsoft.Xrm.Sdk.Metadata; using System; using System.Diagnostics; +using System.Text.RegularExpressions; namespace CloudSmith.Cds.CrmSvcUtil.Naming { @@ -52,7 +53,12 @@ public virtual string GetNameForMessagePair(SdkMessagePair messagePair, IService public virtual string GetNameForOption(OptionSetMetadataBase optionSetMetadata, OptionMetadata optionMetadata, IServiceProvider services) { - return DefaultService.GetNameForOption(optionSetMetadata, optionMetadata, services); + var returnValue = DefaultService.GetNameForOption(optionSetMetadata, optionMetadata, services); + + Regex regex = new Regex("^\\d"); + bool isMatch = regex.IsMatch(returnValue); + + return isMatch ? $"_{returnValue}" : returnValue; } public virtual string GetNameForOptionSet(EntityMetadata entityMetadata, OptionSetMetadataBase optionSetMetadata, IServiceProvider services) diff --git a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Properties/AssemblyInfo.cs b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Properties/AssemblyInfo.cs index 1652e7a..a54c7bc 100644 --- a/resources/tools/CloudSmith.Cds.CrmSvcUtil/Properties/AssemblyInfo.cs +++ b/resources/tools/CloudSmith.Cds.CrmSvcUtil/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("CloudSmith.Dynamics365.CrmSvcUtil")] +[assembly: AssemblyTitle("CloudSmith.Cds.CrmSvcUtil")] [assembly: AssemblyDescription("Extensions for Microsoft CrmSvcUtil.exe")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("CloudSmith Consulting LLC")] -[assembly: AssemblyProduct("CloudSmith Dynamics365 DevOps")] -[assembly: AssemblyCopyright("Copyright © 2019 CloudSmith Consulting LLC")] +[assembly: AssemblyProduct("CloudSmith CDS for Code extension")] +[assembly: AssemblyCopyright("Copyright © 2020 CloudSmith Consulting LLC")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.8.13.0")] +[assembly: AssemblyFileVersion("0.8.13.0")] diff --git a/resources/webviews/connection-editor.html b/resources/webviews/connection-editor.html index 2d91208..5b7f227 100644 --- a/resources/webviews/connection-editor.html +++ b/resources/webviews/connection-editor.html @@ -1,7 +1,7 @@