Class ContentBase
This is the base class for all content types (for example: data source, workbooks, projects, sites, etc).
Namespace: Tableau.Migration.Content
Assembly: Tableau.Migration.dll
Syntax
public abstract class ContentBase : IContentReference, IEquatable<IContentReference>, IRestIdentifiable
Constructors
ContentBase()
Creates a new ContentBase instance.
Declaration
public ContentBase()
ContentBase(IContentReference)
Creates a new ContentBase instance.
Declaration
public ContentBase(IContentReference reference)
Parameters
Type | Name | Description |
---|---|---|
IContentReference | reference | The content reference. |
Fields
ContentUrlComparer
Gets a StringComparer suitable for comparing content URLs for workbooks, views, and data sources.
Declaration
public static readonly StringComparer ContentUrlComparer
Field Value
Type | Description |
---|---|
StringComparer |
NameComparer
Gets a StringComparer suitable for comparing names.
Declaration
public static readonly StringComparer NameComparer
Field Value
Type | Description |
---|---|
StringComparer |
NameComparison
Gets a StringComparison suitable for comparing names.
Declaration
public static readonly StringComparison NameComparison
Field Value
Type | Description |
---|---|
StringComparison |
Properties
ContentUrl
Get the site-unique "content URL" of the content item, or an empty string if the content type does not use a content URL.
Declaration
public virtual string ContentUrl { get; protected set; }
Property Value
Type | Description |
---|---|
string |
Id
Gets the unique identifier.
Declaration
public virtual Guid Id { get; protected set; }
Property Value
Type | Description |
---|---|
Guid |
Location
Gets the logical location path of the content item, for project-level content this is the project path and the content item name.
Declaration
public virtual ContentLocation Location { get; protected set; }
Property Value
Type | Description |
---|---|
ContentLocation |
Name
Gets the name of the content item. This is equivalent to the last segment of the Location. Renames should be performed through mapping.
Declaration
public virtual string Name { get; protected set; }
Property Value
Type | Description |
---|---|
string |
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
Equals(IContentReference?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(IContentReference? other)
Parameters
Type | Name | Description |
---|---|---|
IContentReference | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
Operators
operator ==(ContentBase?, ContentBase?)
Declaration
public static bool operator ==(ContentBase? a, ContentBase? b)
Parameters
Type | Name | Description |
---|---|---|
ContentBase | a | |
ContentBase | b |
Returns
Type | Description |
---|---|
bool |
operator !=(ContentBase?, ContentBase?)
Declaration
public static bool operator !=(ContentBase? a, ContentBase? b)
Parameters
Type | Name | Description |
---|---|---|
ContentBase | a | |
ContentBase | b |
Returns
Type | Description |
---|---|
bool |