Show / Hide Table of Contents

Class Architecture

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

Inheritance
Object
Architecture
Implements
IEquatable<Architecture>
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public sealed class Architecture : ValueType

Constructors

Architecture(String)

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

Declaration
public Architecture(string architecture)
Parameters
Type Name Description
String architecture
Exceptions
Type Condition
FormatException

architecture is not in the form "os-cpu"

Architecture(OS, Cpu)

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

Declaration
public Architecture(OS OS, Cpu Cpu)
Parameters
Type Name Description
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.

Declaration
public static readonly Architecture CurrentSystem
Field Value
Type Description
Architecture

Properties

Cpu

Determines which CPU-architectures are supported.

Declaration
public Cpu Cpu { get; set; }
Property Value
Type Description
Cpu

OS

Determines which operating systems are supported.

Declaration
public OS OS { get; set; }
Property Value
Type Description
OS

Methods

Deconstruct(out OS, out Cpu)

Declaration
public void Deconstruct(out OS OS, out Cpu Cpu)
Parameters
Type Name Description
OS OS
Cpu Cpu

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean

Equals(Architecture)

Declaration
public bool Equals(Architecture other)
Parameters
Type Name Description
Architecture other
Returns
Type Description
Boolean

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

ToString()

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

Declaration
public override string ToString()
Returns
Type Description
String

Operators

Equality(Architecture, Architecture)

Declaration
public static bool operator ==(Architecture left, Architecture right)
Parameters
Type Name Description
Architecture left
Architecture right
Returns
Type Description
Boolean

Inequality(Architecture, Architecture)

Declaration
public static bool operator !=(Architecture left, Architecture right)
Parameters
Type Name Description
Architecture left
Architecture right
Returns
Type Description
Boolean

Implements

System.IEquatable<T>

Extension Methods

ArchitectureExtensions.RunsOn(Architecture, Architecture)
In This Article
Back to top Copyright Bastian Eicher et al