Metadata

Description

sealed class Tinman.Licence.Metadata

Licence metadata that is read from the execution context.

Public / Constructors

Current


public static method Current → (1)

flags opt : int32 = 0xA17

The flags for choosing which metadata to obtain:
0x0001 : CompanyName (default)
0x0002 : CopyrightNotice (default)
0x0004 : DomainName (default)
0x0008 : MachineId
0x0010 : ProductName (default)
0x0020 : ProgramFile
0x0040 : ProgramHash
0x0080 : ProgramTitle
0x0100 : ProgramVersion
0x0200 : Timestamp (default)
0x0400 : TrademarkNotice
0x0800 : UserName (default)

returns → Metadata

The current metadata.

Reads metadata from the execution context.

Public / Attributes

Company​Name


public readonly attribute CompanyName → (string)

The company name.

Will be the empty string iff this metadata value has not been obtained.

Copyright​Notice


public readonly attribute CopyrightNotice → (string [ ])

The legal copyright notice, including legit variations.

The first element is always the original metadata value. Additional elements represent legit variations:

  • Year number:
    If a single occurrence of a four-digit number (e.g. 2022) is present, it is interpreted as a year number and variations are generated for the past back to the year 2000.
    Consider a perpetual licence key that has been purchased for this copyright metadata:

    'Copyright (C) 2010 Some Company, all rights reserved.'

    The year number variation ensures that the same licence key still works when the year number in the copyright metadata is changed, for example:

    'Copyright (C) 2022 Some Company, all rights reserved.'

Will be an array containing a single empty string element iff this metadata value has not been obtained.

Domain​Name


public readonly attribute DomainName → (string)

The current user domain.

Will be the empty string iff this metadata value has not been obtained.

Machine​Id


public readonly attribute MachineId → (string)

An opaque identifier of the physical machine.

Will be the empty string iff this metadata value has not been obtained.

Product​Name


public readonly attribute ProductName → (string)

The legal product name.

Will be the empty string iff this metadata value has not been obtained.

Program​File


public readonly attribute ProgramFile → (string)

The file name of the program binary.

Will be the empty string iff this metadata value has not been obtained.

Program​Hash


public readonly attribute ProgramHash → (string)

The hash of the program binary.

Will be the empty string iff this metadata value has not been obtained.

Program​Title


public readonly attribute ProgramTitle → (string)

The title of the program binary.

Will be the empty string iff this metadata value has not been obtained.

Program​Version


public readonly attribute ProgramVersion → (string)

The version of the program binary.

Will be the empty string iff this metadata value has not been obtained.

Timestamp


public readonly attribute Timestamp → (int32)

The timestamp index.

Will be -1 iff this metadata value has not been obtained.

Trademark​Notice


public readonly attribute TrademarkNotice → (string)

The legal trademark notice.

Will be the empty string iff this metadata value has not been obtained.

User​Name


public readonly attribute UserName → (string)

The current user name.

Will be the empty string iff this metadata value has not been obtained.