Table of Contents

Class VideoModuleBuilder

Namespace
Kook
Assembly
Kook.Net.Core.dll

Represents a video module builder for creating a VideoModule.

public class VideoModuleBuilder : IModuleBuilder, IEquatable<VideoModuleBuilder>, IEquatable<IModuleBuilder>
Inheritance
VideoModuleBuilder
Implements
Inherited Members

Constructors

VideoModuleBuilder()

Initializes a new instance of the VideoModuleBuilder class.

public VideoModuleBuilder()

VideoModuleBuilder(string, string?)

Initializes a new instance of the VideoModuleBuilder class.

public VideoModuleBuilder(string source, string? title = null)

Parameters

source string

The source URL of the video.

title string

The title of the video.

Properties

Source

Gets or sets the source URL of the video.

public string? Source { get; set; }

Property Value

string

The source URL of the video.

Title

Gets or sets the title of the video.

public string? Title { get; set; }

Property Value

string

The title of the video.

Type

Specifies the module type of the IModule this builder creates.

public ModuleType Type { get; }

Property Value

ModuleType

A ModuleType representing the module type of the IModule this builder creates.

Methods

Build()

Builds this builder into a VideoModule.

public VideoModule Build()

Returns

VideoModule

A VideoModule representing the built video module object.

Exceptions

ArgumentNullException

The Source url is null.

ArgumentException

The Source url is empty.

InvalidOperationException

The Source url does not include a protocol (either HTTP or HTTPS).

Equals(VideoModuleBuilder?)

Determines whether the specified VideoModuleBuilder is equal to the current VideoModuleBuilder.

public bool Equals(VideoModuleBuilder? videoModuleBuilder)

Parameters

videoModuleBuilder VideoModuleBuilder

The VideoModuleBuilder to compare with the current VideoModuleBuilder.

Returns

bool

true if the specified VideoModuleBuilder is equal to the current VideoModuleBuilder; otherwise, false.

Equals(object?)

Determines whether the specified VideoModuleBuilder is equal to the current VideoModuleBuilder.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current VideoModuleBuilder.

Returns

bool

true if the specified VideoModuleBuilder is equal to the current VideoModuleBuilder; otherwise, false.

Remarks

If the object passes is an VideoModuleBuilder, Equals(VideoModuleBuilder?) will be called to compare the 2 instances.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

WithSource(string?)

Sets the source URL of the video.

public VideoModuleBuilder WithSource(string? source)

Parameters

source string

The source URL of the video to be set.

Returns

VideoModuleBuilder

The current builder.

WithTitle(string)

Sets the title of the video.

public VideoModuleBuilder WithTitle(string title)

Parameters

title string

The title of the video to be set.

Returns

VideoModuleBuilder

The current builder.

Operators

operator ==(VideoModuleBuilder?, VideoModuleBuilder?)

Determines whether the specified VideoModuleBuilder is equal to the current VideoModuleBuilder.

public static bool operator ==(VideoModuleBuilder? left, VideoModuleBuilder? right)

Parameters

left VideoModuleBuilder
right VideoModuleBuilder

Returns

bool

true if the specified VideoModuleBuilder is equal to the current VideoModuleBuilder; otherwise, false.

operator !=(VideoModuleBuilder?, VideoModuleBuilder?)

Determines whether the specified VideoModuleBuilder is not equal to the current VideoModuleBuilder.

public static bool operator !=(VideoModuleBuilder? left, VideoModuleBuilder? right)

Parameters

left VideoModuleBuilder
right VideoModuleBuilder

Returns

bool

true if the specified VideoModuleBuilder is not equal to the current VideoModuleBuilder; otherwise, false.