C# Класс 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
Наследование: ICodeWriterFilterService
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
Skip bool

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
Skip ( string name ) : bool

Описание методов

CodeWriterFilterService() публичный Метод

public CodeWriterFilterService ( ICodeWriterFilterService defaultService ) : System
defaultService ICodeWriterFilterService
Результат System

GenerateAttribute() публичный Метод

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
Результат bool

GenerateEntity() публичный Метод

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
Результат bool

GenerateOption() публичный Метод

public GenerateOption ( OptionMetadata optionMetadata, IServiceProvider services ) : bool
optionMetadata OptionMetadata
services IServiceProvider
Результат bool

GenerateOptionSet() публичный Метод

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
Результат bool

GenerateRelationship() публичный Метод

We don't want to generate any relationships.
public GenerateRelationship ( RelationshipMetadataBase relationshipMetadata, EntityMetadata otherEntityMetadata, IServiceProvider services ) : bool
relationshipMetadata RelationshipMetadataBase
otherEntityMetadata EntityMetadata
services IServiceProvider
Результат bool

GenerateServiceContext() публичный Метод

We don't want to generate any service contexts.
public GenerateServiceContext ( IServiceProvider services ) : bool
services IServiceProvider
Результат bool