Show / Hide Table of Contents

Class LocalizableImage

Provides methods of working with localized image.

Inheritance
System.Object
LocalizableValue
LocalizableValue<TerrasoftImage>
LocalizableImage
Implements
System.ICloneable
Inherited Members
LocalizableValue<TerrasoftImage>.ResetCultureValues()
LocalizableValue<TerrasoftImage>.HasAnyValue()
LocalizableValue<TerrasoftImage>.LoadCultureValues()
LocalizableValue<TerrasoftImage>.HasCultureValue(CultureInfo)
LocalizableValue<TerrasoftImage>.SetCultureValue(CultureInfo, TerrasoftImage)
LocalizableValue<TerrasoftImage>.GetCultureValue(CultureInfo, Boolean)
LocalizableValue<TerrasoftImage>.GetCultureValueWithFallback(CultureInfo, Boolean)
LocalizableValue<TerrasoftImage>.ClearCultureValue(CultureInfo)
LocalizableValue<TerrasoftImage>.Value
LocalizableValue<TerrasoftImage>.HasValue
LocalizableValue<TerrasoftImage>.CultureValues
LocalizableValue.SetResourceInfo(String, String, Boolean)
LocalizableValue.SetResourceInfo(IResourceStorage, String, String, Boolean)
LocalizableValue.Storage
LocalizableValue.ResourceManager
LocalizableValue.ResourceManagerName
LocalizableValue.ResourceItemName
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Terrasoft.Common
Assembly: Terrasoft.Common.dll
Syntax
public class LocalizableImage : LocalizableValue<TerrasoftImage>, ICloneable

Constructors

LocalizableImage()

Initializes a new instance of the class. LocalizableImage

Declaration
public LocalizableImage()

LocalizableImage(Byte[])

Declaration
[Obsolete("7.15.0 | Method is not in use and will be removed in upcoming releases")]
public LocalizableImage(byte[] data)
Parameters
Type Name Description
System.Byte[] data

LocalizableImage(String, String)

Initializes a new instance of the LocalizableImage class using the specified resource manager and specified resource element.

Declaration
public LocalizableImage(string resourceManagerName, string resourceItemName)
Parameters
Type Name Description
System.String resourceManagerName

Resource manager name.

System.String resourceItemName

Name of the resource item.

LocalizableImage(IResourceStorage, String, String)

Initializes a new instance of the LocalizableImage class using the specified resource storage, resource manager and resource item.

Declaration
public LocalizableImage(IResourceStorage storage, string resourceManagerName, string resourceItemName)
Parameters
Type Name Description
IResourceStorage storage

Resource repository - a class that implements the IResourceStorage interface.

System.String resourceManagerName

Resource manager name.

System.String resourceItemName

Name of the resource item.

LocalizableImage(LocalizableImage)

Initializes a new instance of the LocalizableImage class using the specified localized image.

Declaration
public LocalizableImage(LocalizableImage source)
Parameters
Type Name Description
LocalizableImage source

Localized image.

Remarks

The constructor creates a new object, which is a copy of source.

LocalizableImage(TerrasoftImage)

Initializes a new instance of the LocalizableImage class using the specified image.

Declaration
public LocalizableImage(TerrasoftImage value)
Parameters
Type Name Description
TerrasoftImage value

Image for initialization of the LocalizableImage instance.

Properties

Empty

Gets an empty localized image.

Declaration
public static LocalizableImage Empty { get; }
Property Value
Type Description
LocalizableImage

Methods

Clone()

Creates the clone of the current LocalizableImage instance.

Declaration
public override object Clone()
Returns
Type Description
System.Object

A new LocalizableImage instance that represents the copy of the current instance.

Overrides
LocalizableValue.Clone()

Equals(Object)

Determines whether the given LocalizableImage instance and the specified System.Object instance have the same values.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The System.Object instance for comparing with the current instance LocalizableImage.

Returns
Type Description
System.Boolean

true, if the obj is of the LocalizableImage type and its value matches with the value of current instance LocalizableImage, otherwise false.

Overrides
System.Object.Equals(System.Object)
Remarks

Overloaded method.

GetCultureValue(CultureInfo)

Gets a value of the System.Drawing.Image type that corresponds to the current LocalizableImage instance in the specified culture or generates exception if the image does not exist.

Declaration
public TerrasoftImage GetCultureValue(CultureInfo culture)
Parameters
Type Name Description
System.Globalization.CultureInfo culture

Culture.

Returns
Type Description
TerrasoftImage

Image, localized according to the culture specified in the culture.

Exceptions
Type Condition
ItemNotFoundException

If an image is not available for the culture culture in the current LocalizableImage instance.

GetFromResourceManager(CultureInfo, String)

Declaration
protected override TerrasoftImage GetFromResourceManager(CultureInfo culture, string itemName)
Parameters
Type Name Description
System.Globalization.CultureInfo culture
System.String itemName
Returns
Type Description
TerrasoftImage
Overrides
Terrasoft.Common.LocalizableValue<Terrasoft.Common.TerrasoftImage>.GetFromResourceManager(System.Globalization.CultureInfo, System.String)

GetFromResourceManagerWithCultureFallback(CultureInfo, String)

Declaration
protected override TerrasoftImage GetFromResourceManagerWithCultureFallback(CultureInfo culture, string itemName)
Parameters
Type Name Description
System.Globalization.CultureInfo culture
System.String itemName
Returns
Type Description
TerrasoftImage
Overrides
Terrasoft.Common.LocalizableValue<Terrasoft.Common.TerrasoftImage>.GetFromResourceManagerWithCultureFallback(System.Globalization.CultureInfo, System.String)

GetHashCode()

Gets hash code for the current localized image.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

Hash code for current instance LocalizableImage in the form of 32-bit signed integer.

Overrides
System.Object.GetHashCode()

Merge(LocalizableImage, LocalizableImage)

Combines the specified localized values.

Declaration
public static LocalizableImage Merge(LocalizableImage target, LocalizableImage source)
Parameters
Type Name Description
LocalizableImage target

Localized image to combine with.

LocalizableImage source

Localized image, which is combined with target.

Returns
Type Description
LocalizableImage

The LocalizableImage instance that represents the result of merging two localized images target and source.

ToString()

Performs implicit conversion of the current LocalizableImage instance to string type.

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Operators

Implicit(String to LocalizableImage)

Performs an implicit conversion of the System.String type to the LocalizableImage type.

Declaration
public static implicit operator LocalizableImage(string value)
Parameters
Type Name Description
System.String value

The System.String instance for conversion.

Returns
Type Description
LocalizableImage

Implicit(LocalizableImage to String)

Performs an implicit conversion of the LocalizableImage type to the System.String type.

Declaration
public static implicit operator string (LocalizableImage localizableImage)
Parameters
Type Name Description
LocalizableImage localizableImage

The LocalizableImage instance for conversion.

Returns
Type Description
System.String

Implicit(LocalizableImage to TerrasoftImage)

Performs an implicit conversion of the LocalizableImage type to the System.Drawing.Image type.

Declaration
public static implicit operator TerrasoftImage(LocalizableImage localizableImage)
Parameters
Type Name Description
LocalizableImage localizableImage

The LocalizableImage instance for conversion.

Returns
Type Description
TerrasoftImage

The System.Drawing.Image instance, equivalent to the localized localizableImage image.

Implicit(TerrasoftImage to LocalizableImage)

Performs an implicit conversion of the System.Drawing.Image type to the LocalizableImage type.

Declaration
public static implicit operator LocalizableImage(TerrasoftImage value)
Parameters
Type Name Description
TerrasoftImage value

The System.Drawing.Image instance for conversion.

Returns
Type Description
LocalizableImage

The LocalizableImage instance, equivalent to the value.

Implements

System.ICloneable

Extension Methods

ReflectionUtilities.GetPropertyValue(Object, String)
ReflectionUtilities.GetPropertyDefValue(Object, String, Object)
ReflectionUtilities.TryGetPropertyValue(Object, String, out Object)
ReflectionUtilities.HasProperty(Object, String)
ReflectionUtilities.GetPropertyValue(Object, String, BindingFlags)
ReflectionUtilities.GetPropertyValueByPath(Object, String)
ReflectionUtilities.SetPropertyValue(Object, String, Object)
ReflectionUtilities.TrySetPropertyValue(Object, String, Object)
ValidateUtilities.CheckArgumentNull(Object, String)
ValidateUtilities.CheckDependencyNull(Object, String)
ValidateUtilities.EnsureDependencyNotNull<T>(T, String)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance)
MetaDataTestUtils.MetaPropertiesShouldNotHaveDefValue<TInstance>(TInstance, Boolean)
NSubstituteExtension.Protected(Object, String, Object[])
NSubstituteExtension.Protected(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Object[])
NSubstituteExtension.ProtectedGeneric<T>(Object, String, Boolean, Object[])
NSubstituteExtension.ProtectedProperty(Object, String)
NSubstituteExtension.MatchInstance<T>(T)
SubstituteUtilities.GetIsSubstituteObject(Object)
SubstituteUtilities.Instead<TInstance, TValue>(TInstance, Func<TInstance, TValue>)
Back to top Generated by DocFX