C# Class Monobjc.AppKit.NSImage

Mostra file Open project: Monobjc/monobjc Class Usage Examples

Public Methods

Method Description
GetObjectData ( SerializationInfo info, StreamingContext context ) : void

Populates a T:System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.

ImageEncryptedNamed ( NSString name, NSString encryptionSeed ) : NSImage

Returns the NSImage instance associated with the specified name (from an encrypted content).

ImageFromEncryptedData ( NSData encryptedData, NSString encryptionSeed ) : NSImage

Decrypts the given data and return an image.

ImageFromEncryptedPath ( NSString path, NSString encryptionSeed ) : NSImage

Decrypts the given resource and return an image.

ImageFromEncryptedResource ( NSString name, NSString encryptionSeed ) : NSImage

Decrypts the given resource and return an image.

ImageFromFile ( NSString filename ) : NSImage

Create a NSImage from a file.

ImageFromResource ( Type type, String resourceName ) : NSImage

Create a NSImage from a manifest resource stream.

Once retrieved, the instance is named and cached.

ImageFromStream ( Stream stream ) : NSImage

Create a NSImage from a stream.

Protected Methods

Method Description
NSImage ( SerializationInfo info, StreamingContext context ) : System

Initializes a new instance of the NSImage class.

This constructor is called during de-serializatin of embedded images for example.

Private Methods

Method Description
DataFromSerialization ( SerializationInfo info ) : NSData

Returns a NSData instance from the serialization context.

Method Details

GetObjectData() public method

Populates a T:System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
/// The caller does not have the required permission. ///
public GetObjectData ( SerializationInfo info, StreamingContext context ) : void
info SerializationInfo The to populate with data.
context StreamingContext The destination (see ) for this serialization.
return void

ImageEncryptedNamed() public static method

Returns the NSImage instance associated with the specified name (from an encrypted content).

public static ImageEncryptedNamed ( NSString name, NSString encryptionSeed ) : NSImage
name Monobjc.Foundation.NSString The name associated with the desired image.
encryptionSeed Monobjc.Foundation.NSString The encryption seed to use.
return NSImage

ImageFromEncryptedData() public static method

Decrypts the given data and return an image.
public static ImageFromEncryptedData ( NSData encryptedData, NSString encryptionSeed ) : NSImage
encryptedData Monobjc.Foundation.NSData The encrypted artwork data.
encryptionSeed Monobjc.Foundation.NSString The encryption seed to use.
return NSImage

ImageFromEncryptedPath() public static method

Decrypts the given resource and return an image.
public static ImageFromEncryptedPath ( NSString path, NSString encryptionSeed ) : NSImage
path Monobjc.Foundation.NSString The image resource path.
encryptionSeed Monobjc.Foundation.NSString The encryption seed to use.
return NSImage

ImageFromEncryptedResource() public static method

Decrypts the given resource and return an image.
public static ImageFromEncryptedResource ( NSString name, NSString encryptionSeed ) : NSImage
name Monobjc.Foundation.NSString The image resource name.
encryptionSeed Monobjc.Foundation.NSString The encryption seed to use.
return NSImage

ImageFromFile() public static method

Create a NSImage from a file.
public static ImageFromFile ( NSString filename ) : NSImage
filename Monobjc.Foundation.NSString The filename.
return NSImage

ImageFromResource() public static method

Create a NSImage from a manifest resource stream.

Once retrieved, the instance is named and cached.

public static ImageFromResource ( Type type, String resourceName ) : NSImage
type System.Type The type whose assembly contains the manifest resource.
resourceName String Name of the resource.
return NSImage

ImageFromStream() public static method

Create a NSImage from a stream.
public static ImageFromStream ( Stream stream ) : NSImage
stream Stream The stream.
return NSImage

NSImage() protected method

Initializes a new instance of the NSImage class.

This constructor is called during de-serializatin of embedded images for example.

protected NSImage ( SerializationInfo info, StreamingContext context ) : System
info SerializationInfo The serialization info.
context StreamingContext The serialization context.
return System