C# Class DLaB.CrmSvcUtilExtensions.OptionSet.CodeWriterFilterService

Specifies that OptionSets should be created. Works in conjunction with CreateOptionSetEnums, since it also specifies other data to be created, but the CreateOptionSetEnums removes it from the DOM after it's already been added, since it needs the metadata. Prevents duplicate OptionSetGeneration
Inheritance: ICodeWriterFilterService
ファイルを表示 Open project: daryllabar/DLaB.Xrm.XrmToolBoxTools

Private Properties

Property Type Description
Skip bool

Public Methods

Method Description
CodeWriterFilterService ( ICodeWriterFilterService defaultService ) : System
GenerateAttribute ( AttributeMetadata attributeMetadata, IServiceProvider services ) : bool

Ideally, we wouldn't generate any attributes, but we must in order to leverage the logic in CrmSvcUtil. If the attribute for an OptionSet is not generated, then a null reference exception is thrown when attempting to create the OptionSet. We will remove these in our ICustomizeCodeDomService implementation.

GenerateEntity ( EntityMetadata entityMetadata, IServiceProvider services ) : bool

Ideally, we wouldn't generate any entities, but we must in order to leverage the logic in CrmSvcUtil. If an entity which contains a custom OptionSet attribute is not generated, then the custom OptionSet will not be generated, either. We will remove these in our ICustomizeCodeDomService implementation.

GenerateOption ( OptionMetadata optionMetadata, IServiceProvider services ) : bool
GenerateOptionSet ( OptionSetMetadataBase optionSetMetadata, IServiceProvider services ) : bool

Does not mark the OptionSet for generation if it has already been generated. This could get called for the same Global Option Set multiple times because it's on multiple Entites

GenerateRelationship ( RelationshipMetadataBase relationshipMetadata, EntityMetadata otherEntityMetadata, IServiceProvider services ) : bool

We don't want to generate any relationships.

GenerateServiceContext ( IServiceProvider services ) : bool

We don't want to generate any service contexts.

Private Methods

Method Description
Skip ( string name ) : bool

Method Details

CodeWriterFilterService() public method

public CodeWriterFilterService ( ICodeWriterFilterService defaultService ) : System
defaultService ICodeWriterFilterService
return System

GenerateAttribute() public method

Ideally, we wouldn't generate any attributes, but we must in order to leverage the logic in CrmSvcUtil. If the attribute for an OptionSet is not generated, then a null reference exception is thrown when attempting to create the OptionSet. We will remove these in our ICustomizeCodeDomService implementation.
public GenerateAttribute ( AttributeMetadata attributeMetadata, IServiceProvider services ) : bool
attributeMetadata AttributeMetadata
services IServiceProvider
return bool

GenerateEntity() public method

Ideally, we wouldn't generate any entities, but we must in order to leverage the logic in CrmSvcUtil. If an entity which contains a custom OptionSet attribute is not generated, then the custom OptionSet will not be generated, either. We will remove these in our ICustomizeCodeDomService implementation.
public GenerateEntity ( EntityMetadata entityMetadata, IServiceProvider services ) : bool
entityMetadata EntityMetadata
services IServiceProvider
return bool

GenerateOption() public method

public GenerateOption ( OptionMetadata optionMetadata, IServiceProvider services ) : bool
optionMetadata OptionMetadata
services IServiceProvider
return bool

GenerateOptionSet() public method

Does not mark the OptionSet for generation if it has already been generated. This could get called for the same Global Option Set multiple times because it's on multiple Entites
public GenerateOptionSet ( OptionSetMetadataBase optionSetMetadata, IServiceProvider services ) : bool
optionSetMetadata OptionSetMetadataBase
services IServiceProvider
return bool

GenerateRelationship() public method

We don't want to generate any relationships.
public GenerateRelationship ( RelationshipMetadataBase relationshipMetadata, EntityMetadata otherEntityMetadata, IServiceProvider services ) : bool
relationshipMetadata RelationshipMetadataBase
otherEntityMetadata EntityMetadata
services IServiceProvider
return bool

GenerateServiceContext() public method

We don't want to generate any service contexts.
public GenerateServiceContext ( IServiceProvider services ) : bool
services IServiceProvider
return bool