C# Class DLaB.CrmSvcUtilExtensions.BaseCustomCodeGenerationService

Inheritance: ICodeGenerationService
Show file Open project: daryllabar/DLaB.Xrm.XrmToolBoxTools

Private Properties

Property Type Description
CheckoutFile void
GetName string
GetNewLines IEnumerable
SetSourceControlInfo void
SplitFileByCodeUnit void
WriteFileIfDifferent void
WriteFilesAsync void

Public Methods

Method Description
GetTypeForAttribute ( Microsoft entityMetadata, Microsoft attributeMetadata, IServiceProvider services ) : CodeGenerationType
GetTypeForEntity ( Microsoft entityMetadata, IServiceProvider services ) : CodeGenerationType
GetTypeForMessagePair ( Microsoft.Crm.Services.Utility.SdkMessagePair messagePair, IServiceProvider services ) : CodeGenerationType
GetTypeForOption ( Microsoft optionSetMetadata, Microsoft optionMetadata, IServiceProvider services ) : CodeGenerationType
GetTypeForOptionSet ( Microsoft entityMetadata, Microsoft optionSetMetadata, IServiceProvider services ) : CodeGenerationType
GetTypeForRequestField ( Microsoft.Crm.Services.Utility.SdkMessageRequest request, Microsoft.Crm.Services.Utility.SdkMessageRequestField requestField, IServiceProvider services ) : CodeGenerationType
GetTypeForResponseField ( Microsoft.Crm.Services.Utility.SdkMessageResponse response, Microsoft.Crm.Services.Utility.SdkMessageResponseField responseField, IServiceProvider services ) : CodeGenerationType
Write ( IOrganizationMetadata organizationMetadata, string language, string outputFile, string targetNamespace, IServiceProvider services ) : void

Protected Methods

Method Description
BaseCustomCodeGenerationService ( ICodeGenerationService service ) : System
EnsureFileIsAccessible ( string filePath ) : void
GetFileTextWithUpdatedClassComment ( string filePath, string commandLineText, bool removeRuntimeVersionComment ) : IEnumerable
GetTypeForAttributeInternal ( Microsoft entityMetadata, Microsoft attributeMetadata, IServiceProvider services ) : CodeGenerationType
GetTypeForEntityInternal ( Microsoft entityMetadata, IServiceProvider services ) : CodeGenerationType
GetTypeForMessagePairInternal ( Microsoft.Crm.Services.Utility.SdkMessagePair messagePair, IServiceProvider services ) : CodeGenerationType
GetTypeForOptionInternal ( Microsoft optionSetMetadata, Microsoft optionMetadata, IServiceProvider services ) : CodeGenerationType
GetTypeForOptionSetInternal ( Microsoft entityMetadata, Microsoft optionSetMetadata, IServiceProvider services ) : CodeGenerationType
GetTypeForRequestFieldInternal ( Microsoft.Crm.Services.Utility.SdkMessageRequest request, Microsoft.Crm.Services.Utility.SdkMessageRequestField requestField, IServiceProvider services ) : CodeGenerationType
GetTypeForResponseFieldInternal ( Microsoft.Crm.Services.Utility.SdkMessageResponse response, Microsoft.Crm.Services.Utility.SdkMessageResponseField responseField, IServiceProvider services ) : CodeGenerationType
Log ( string log ) : void
UndoCheckoutIfUnchanged ( string fileName ) : bool

Returns true if the file was unchanged and an undo operation was performed

WriteInternal ( IOrganizationMetadata organizationMetadata, string language, string outputFile, string targetNamespace, IServiceProvider services ) : void

Private Methods

Method Description
CheckoutFile ( string fileName ) : void
GetName ( CodeUnit codeUnit, string line ) : string
GetNewLines ( string lines, int insertAtLine, string text, int skipLine ) : IEnumerable
SetSourceControlInfo ( FileToCreate file ) : void
SplitFileByCodeUnit ( CodeUnit codeUnit, string filePath, IEnumerable lines ) : void
WriteFileIfDifferent ( ProjectFile project, FileToCreate file ) : void
WriteFilesAsync ( List files ) : void

Method Details

BaseCustomCodeGenerationService() protected method

protected BaseCustomCodeGenerationService ( ICodeGenerationService service ) : System
service ICodeGenerationService
return System

EnsureFileIsAccessible() protected method

protected EnsureFileIsAccessible ( string filePath ) : void
filePath string
return void

GetFileTextWithUpdatedClassComment() protected method

protected GetFileTextWithUpdatedClassComment ( string filePath, string commandLineText, bool removeRuntimeVersionComment ) : IEnumerable
filePath string
commandLineText string
removeRuntimeVersionComment bool
return IEnumerable

GetTypeForAttribute() public method

public GetTypeForAttribute ( Microsoft entityMetadata, Microsoft attributeMetadata, IServiceProvider services ) : CodeGenerationType
entityMetadata Microsoft
attributeMetadata Microsoft
services IServiceProvider
return CodeGenerationType

GetTypeForAttributeInternal() protected method

protected GetTypeForAttributeInternal ( Microsoft entityMetadata, Microsoft attributeMetadata, IServiceProvider services ) : CodeGenerationType
entityMetadata Microsoft
attributeMetadata Microsoft
services IServiceProvider
return CodeGenerationType

GetTypeForEntity() public method

public GetTypeForEntity ( Microsoft entityMetadata, IServiceProvider services ) : CodeGenerationType
entityMetadata Microsoft
services IServiceProvider
return CodeGenerationType

GetTypeForEntityInternal() protected method

protected GetTypeForEntityInternal ( Microsoft entityMetadata, IServiceProvider services ) : CodeGenerationType
entityMetadata Microsoft
services IServiceProvider
return CodeGenerationType

GetTypeForMessagePair() public method

public GetTypeForMessagePair ( Microsoft.Crm.Services.Utility.SdkMessagePair messagePair, IServiceProvider services ) : CodeGenerationType
messagePair Microsoft.Crm.Services.Utility.SdkMessagePair
services IServiceProvider
return CodeGenerationType

GetTypeForMessagePairInternal() protected method

protected GetTypeForMessagePairInternal ( Microsoft.Crm.Services.Utility.SdkMessagePair messagePair, IServiceProvider services ) : CodeGenerationType
messagePair Microsoft.Crm.Services.Utility.SdkMessagePair
services IServiceProvider
return CodeGenerationType

GetTypeForOption() public method

public GetTypeForOption ( Microsoft optionSetMetadata, Microsoft optionMetadata, IServiceProvider services ) : CodeGenerationType
optionSetMetadata Microsoft
optionMetadata Microsoft
services IServiceProvider
return CodeGenerationType

GetTypeForOptionInternal() protected method

protected GetTypeForOptionInternal ( Microsoft optionSetMetadata, Microsoft optionMetadata, IServiceProvider services ) : CodeGenerationType
optionSetMetadata Microsoft
optionMetadata Microsoft
services IServiceProvider
return CodeGenerationType

GetTypeForOptionSet() public method

public GetTypeForOptionSet ( Microsoft entityMetadata, Microsoft optionSetMetadata, IServiceProvider services ) : CodeGenerationType
entityMetadata Microsoft
optionSetMetadata Microsoft
services IServiceProvider
return CodeGenerationType

GetTypeForOptionSetInternal() protected method

protected GetTypeForOptionSetInternal ( Microsoft entityMetadata, Microsoft optionSetMetadata, IServiceProvider services ) : CodeGenerationType
entityMetadata Microsoft
optionSetMetadata Microsoft
services IServiceProvider
return CodeGenerationType

GetTypeForRequestField() public method

public GetTypeForRequestField ( Microsoft.Crm.Services.Utility.SdkMessageRequest request, Microsoft.Crm.Services.Utility.SdkMessageRequestField requestField, IServiceProvider services ) : CodeGenerationType
request Microsoft.Crm.Services.Utility.SdkMessageRequest
requestField Microsoft.Crm.Services.Utility.SdkMessageRequestField
services IServiceProvider
return CodeGenerationType

GetTypeForRequestFieldInternal() protected method

protected GetTypeForRequestFieldInternal ( Microsoft.Crm.Services.Utility.SdkMessageRequest request, Microsoft.Crm.Services.Utility.SdkMessageRequestField requestField, IServiceProvider services ) : CodeGenerationType
request Microsoft.Crm.Services.Utility.SdkMessageRequest
requestField Microsoft.Crm.Services.Utility.SdkMessageRequestField
services IServiceProvider
return CodeGenerationType

GetTypeForResponseField() public method

public GetTypeForResponseField ( Microsoft.Crm.Services.Utility.SdkMessageResponse response, Microsoft.Crm.Services.Utility.SdkMessageResponseField responseField, IServiceProvider services ) : CodeGenerationType
response Microsoft.Crm.Services.Utility.SdkMessageResponse
responseField Microsoft.Crm.Services.Utility.SdkMessageResponseField
services IServiceProvider
return CodeGenerationType

GetTypeForResponseFieldInternal() protected method

protected GetTypeForResponseFieldInternal ( Microsoft.Crm.Services.Utility.SdkMessageResponse response, Microsoft.Crm.Services.Utility.SdkMessageResponseField responseField, IServiceProvider services ) : CodeGenerationType
response Microsoft.Crm.Services.Utility.SdkMessageResponse
responseField Microsoft.Crm.Services.Utility.SdkMessageResponseField
services IServiceProvider
return CodeGenerationType

Log() protected method

protected Log ( string log ) : void
log string
return void

UndoCheckoutIfUnchanged() protected method

Returns true if the file was unchanged and an undo operation was performed
protected UndoCheckoutIfUnchanged ( string fileName ) : bool
fileName string
return bool

Write() public method

public Write ( IOrganizationMetadata organizationMetadata, string language, string outputFile, string targetNamespace, IServiceProvider services ) : void
organizationMetadata IOrganizationMetadata
language string
outputFile string
targetNamespace string
services IServiceProvider
return void

WriteInternal() protected method

protected WriteInternal ( IOrganizationMetadata organizationMetadata, string language, string outputFile, string targetNamespace, IServiceProvider services ) : void
organizationMetadata IOrganizationMetadata
language string
outputFile string
targetNamespace string
services IServiceProvider
return void