Click or drag to resize
ColorWrapper Class
View Project on GitHub
Represents a wrapper for the v2/colors endpoint.
Inheritance Hierarchy
SystemObject
  GW2CSharpApiBase
    GW2CSharp.V2.Unauthenticated.ColorsColorWrapper

Namespace: GW2CSharp.V2.Unauthenticated.Colors
Assembly: GW2CSharp (in GW2CSharp.dll) Version: 0.15.0.0 (0.15)
Syntax
C#
public class ColorWrapper : ApiBase

The ColorWrapper type exposes the following members.

Constructors
  NameDescription
Public methodColorWrapper
A wrapper for all color endpoint calls.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAll
Returns the a Dictionary with all known colors.
Public methodGetAll(RequestedLanguage)
Returns the a Dictionary with all known colors.
Public methodGetById(Int32)
Returns the color that matches the id.
Public methodGetById(Int32, RequestedLanguage)
Returns the color that matches the id.
Public methodGetByPage(Int32, Int32)
Returns colors in pagesize.
Public methodGetByPage(Int32, Int32, RequestedLanguage)
Returns colors in pagesize.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Examples
public void GetASingleColor()
{
    Color skyColor = GW2Api.V2().Colors.GetById(10);
}

public void GetASingleColorInASpecificLanguage()
{
    RequestedLanguage language = RequestedLanguage.de;
    Color skyColor = GW2Api.V2(language).Colors.GetById(10);
}

public void GetAllColors()
{
    Dictionary<int, Lazy<Color>> allColors = GW2Api.V2().Colors.GetAll();
    Color skyColor = allColors[10].Value;
}
See Also