Table of Contents

Struct Architecture

Namespace
ZeroInstall.Model
Assembly
ZeroInstall.Model.dll

Describes a combination of an operating system and a CPU architecture.

[TypeConverter(typeof(ArchitectureConverter))]
public struct Architecture : IEquatable<Architecture>
Implements
Extension Methods

Constructors

Architecture(string)

Creates a new architecture structure from a string in the form "os-cpu".

public Architecture(string architecture)

Parameters

architecture string

Exceptions

FormatException

architecture is not in the form "os-cpu"

Architecture(OS, Cpu)

Describes a combination of an operating system and a CPU architecture.

public Architecture(OS OS = OS.All, Cpu Cpu = Cpu.All)

Parameters

OS OS

Determines which operating systems are supported.

Cpu Cpu

Determines which CPU-architectures are supported.

Fields

CurrentSystem

An architecture representing the currently running system.

public static readonly Architecture CurrentSystem

Field Value

Architecture

Properties

Cpu

Determines which CPU-architectures are supported.

public Cpu Cpu { readonly get; set; }

Property Value

Cpu

OS

Determines which operating systems are supported.

public OS OS { readonly get; set; }

Property Value

OS

Methods

Deconstruct(out OS, out Cpu)

public readonly void Deconstruct(out OS OS, out Cpu Cpu)

Parameters

OS OS
Cpu Cpu

Equals(object)

public override readonly bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(Architecture)

public readonly bool Equals(Architecture other)

Parameters

other Architecture

Returns

bool

GetHashCode()

public override readonly int GetHashCode()

Returns

int

ToString()

Returns the architecture in the form "os-cpu". Safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(Architecture, Architecture)

public static bool operator ==(Architecture left, Architecture right)

Parameters

left Architecture
right Architecture

Returns

bool

operator !=(Architecture, Architecture)

public static bool operator !=(Architecture left, Architecture right)

Parameters

left Architecture
right Architecture

Returns

bool