Show / Hide Table of Contents

Interface IUnpacker<T>

Defines a series of methods to be implemented by a class that allows getting and extracting resources.

Namespace: TheXDS.MCART.Resources
Assembly: MCART.dll
Syntax
public interface IUnpacker<T>
Type Parameters
Name Description
T

Type of resources to get.

Methods

| Edit this page View Source

TryUnpack(string, ICompressorGetter, out T)

Tries to get an identifiable resource.

Declaration
bool TryUnpack(string id, ICompressorGetter compressor, out T result)
Parameters
Type Name Description
string id

Identifier of the resource.

ICompressorGetter compressor

ICompressorGetter to use for extracting the resource.

T result

Out parameter. A resource of type T.

Returns
Type Description
bool

true if the resource was successfully extracted, false otherwise.

| Edit this page View Source

TryUnpack(string, out T)

Tries to get an identifiable resource.

Declaration
bool TryUnpack(string id, out T result)
Parameters
Type Name Description
string id

Identifier of the resource.

T result

Out parameter. A resource of type T.

Returns
Type Description
bool

true if the resource was successfully extracted, false otherwise.

| Edit this page View Source

Unpack(string)

Gets an identifiable resource.

Declaration
T Unpack(string id)
Parameters
Type Name Description
string id

Identifier of the resource.

Returns
Type Description
T

A resource of type T.

| Edit this page View Source

Unpack(string, ICompressorGetter)

Extracts a compressed resource using the compressor with the specified identifier.

Declaration
T Unpack(string id, ICompressorGetter compressor)
Parameters
Type Name Description
string id

Identifier of the resource.

ICompressorGetter compressor

ICompressorGetter to use for extracting the resource.

Returns
Type Description
T

An uncompressed resource of type T.

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX