MetadataSerializationContext.UpdateModel Method

Definition

Overloads

UpdateModel(Model, Object)

Updates the provided Model based on the content of the metadata documents that are stored in the context.

UpdateModel(Model, MetadataDeserializationOptions, Object)

Updates the provided Model based on the content of the metadata documents that are stored in the context.

UpdateModel(Model, Object)

Updates the provided Model based on the content of the metadata documents that are stored in the context.

public void UpdateModel (Microsoft.AnalysisServices.Tabular.Model model, object context = default);
member this.UpdateModel : Microsoft.AnalysisServices.Tabular.Model * obj -> unit
Public Sub UpdateModel (model As Model, Optional context As Object = Nothing)

Parameters

model
Model

The model to update.

context
Object

An optional user context that will be associated with the serialization operation.

Exceptions

The specified model is a null reference (Nothing in Visual Basic).

There are no metadata documents that are loaded into the context.

Remarks

There are certain limitations on the content of the documents in the context that are supported in such an update operation:

  • They cannot just update specific properties in an object, it can only be used to update the entire object, as well as any child object that is included in its metadata tree.
  • The Database and\or Model objects cannot be updated in this operation, only metadata objects that are children, either direct or indirect, of the model.
  • There is no guarantee of any specific order in which the documents in the context will be processed, ensure that there are no dependencies between documents.
  • There is no guarantee that the target model will remain intact in case of a failure; if the method failed and an exception is raised, the target model might have been partially updated and include some changes that are based on documents that were already processed before the document that failed and triggered the exception.

The operation of deserializing the metadata content of the documents in the context, as well as updating the model according to the content, might raise exceptions that are specific to the style of the content that is being deserialized; for example, a deserialization of TMDL content, can result in a TmdlFormatException or a TmdlSerializationException that is thrown for errors in the documents.

Applies to

UpdateModel(Model, MetadataDeserializationOptions, Object)

Updates the provided Model based on the content of the metadata documents that are stored in the context.

public void UpdateModel (Microsoft.AnalysisServices.Tabular.Model model, Microsoft.AnalysisServices.Tabular.Serialization.MetadataDeserializationOptions options, object context = default);
member this.UpdateModel : Microsoft.AnalysisServices.Tabular.Model * Microsoft.AnalysisServices.Tabular.Serialization.MetadataDeserializationOptions * obj -> unit
Public Sub UpdateModel (model As Model, options As MetadataDeserializationOptions, Optional context As Object = Nothing)

Parameters

model
Model

The model to update.

options
MetadataDeserializationOptions

The options for the deserialization action.

context
Object

An optional user context that will be associated with the serialization operation.

Exceptions

  • The specified model is a null reference (Nothing in Visual Basic).
  • The specified options instance is a null reference (Nothing in Visual Basic).

There are no metadata documents that are loaded into the context.

Remarks

There are certain limitations on the content of the documents in the context that are supported in such an update operation:

  • They cannot just update specific properties in an object, it can only be used to update the entire object, as well as any child object that is included in its metadata tree.
  • The Database and\or Model objects cannot be updated in this operation, only metadata objects that are children, either direct or indirect, of the model.
  • There is no guarantee of any specific order in which the documents in the context will be processed, ensure that there are no dependencies between documents.
  • There is no guarantee that the target model will remain intact in case of a failure; if the method failed and an exception is raised, the target model might have been partially updated and include some changes that are based on documents that were already processed before the document that failed and triggered the exception.

The operation of deserializing the metadata content of the documents in the context, as well as updating the model according to the content, might raise exceptions that are specific to the style of the content that is being deserialized; for example, a deserialization of TMDL content, can result in a TmdlFormatException or a TmdlSerializationException that is thrown for errors in the documents.

Applies to