A Sandcastle Documented Class Library

# MetricSet ReplaceElement Method

Replaces the original usage element with the analysis element, if the categories are compatible. The target element is removed.

Namespace: Dundas.BI.Entities.MetricSets
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    public virtual AnalysisElementUsage ReplaceElement(
    	AnalysisElementUsage originalElement,
    	IAnalysisElement analysisElement
    )

    Public Overridable Function ReplaceElement (
    	originalElement As AnalysisElementUsage,
    	analysisElement As IAnalysisElement
    ) As AnalysisElementUsage

    public:
    virtual AnalysisElementUsage^ ReplaceElement(
    	AnalysisElementUsage^ originalElement,
    	IAnalysisElement^ analysisElement
    )

    abstract ReplaceElement :
            originalElement : AnalysisElementUsage *
            analysisElement : IAnalysisElement -> AnalysisElementUsage
    override ReplaceElement :
            originalElement : AnalysisElementUsage *
            analysisElement : IAnalysisElement -> AnalysisElementUsage

#### Parameters

originalElement
  Type: Dundas.BI.Entities.MetricSets
  AnalysisElementUsage
  The target usage element.
analysisElement
  Type: Dundas.BI.Data.Metadata
  IAnalysisElement
  The source analysis element.

#### Return Value

Type: AnalysisElementUsage
The new usage element.
Exceptions

Exception | Condition
--- | ---
ArgumentNullException | originalElement or analysisElement is .
ArgumentException | originalElement or analysisElement do not belong to the current instance or originalElement and analysisElement have incompatible categories.

See Also

#### Reference

MetricSet Class
Dundas.BI.Entities.MetricSets Namespace