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
Afficher le fichier Open project: daryllabar/DLaB.Xrm.XrmToolBoxTools

Private Properties

Свойство Type Description
Skip bool

Méthodes publiques

Méthode 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

Méthode Description
Skip ( string name ) : bool

Method Details

CodeWriterFilterService() public méthode

public CodeWriterFilterService ( ICodeWriterFilterService defaultService ) : System
defaultService ICodeWriterFilterService
Résultat System

GenerateAttribute() public méthode

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
Résultat bool

GenerateEntity() public méthode

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
Résultat bool

GenerateOption() public méthode

public GenerateOption ( OptionMetadata optionMetadata, IServiceProvider services ) : bool
optionMetadata OptionMetadata
services IServiceProvider
Résultat bool

GenerateOptionSet() public méthode

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
Résultat bool

GenerateRelationship() public méthode

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

GenerateServiceContext() public méthode

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