----------------------------------------------------------------------------------------------------------------------------

Store custom metadata

Store custom metadata using C#

Storing meta data is as easy as storing a normal item in a filestorage. The object to be persisted is simply one of the arguments in the store-methods;
  • public static void StoreBytes(string fileStorageName, Guid dataIdentifier, byte[] fileData, ICustomMetaData customMetaData, AddFileBehaviour addFileBehaviour)
  • public static void StoreFile(string fileStorageName, Guid dataIdentifier, string filename, ICustomMetaData customMetaData, AddFileBehaviour addFileBehaviour)
  • public static void StoreStream(string fileStorageName, Guid dataIdentifier, Stream streamToStore, int numberOfBytes, ICustomMetaData customMetaData, AddFileBehaviour addFileBehaviour)
  • public static void StoreString(string fileStorageName, Guid dataIdentifier, Encoding encoding, string stringToStore, ICustomMetaData customMetaData, AddFileBehaviour addFileBehaviour)
  • public static void StoreString(string fileStorageName, Guid dataIdentifier, string stringToStore, ICustomMetaData customMetaData, AddFileBehaviour addFileBehaviour)
  • public static void StoreHttpRequest(string fileStorageName, Guid dataIdentifier, string url, ICustomMetaData customMetaData, AddFileBehaviour addFileBehaviour, string userAgent)
  • public static void StoreObject(string fileStorageName, Guid dataIdentifier, IDynamiteXml objectToStore, ICustomMetaData customMetaData, AddFileBehaviour addFileBehaviour)

If you don't want to add any custom metadata, you can simply pass the 'null' value to the store methods.

Store custom metadata using the CLI

Since the object to be used as metadata is a C# object, its not possible to specify the custom meta data using the CLI; instead the CLI will always pass 'null', resulting in a EmptyCustomMetaData class to be stored.

----------------------------------------------------------------------------------------------------------------------------

Last edited May 30, 2009 at 10:18 AM by barkgj, version 6

Comments

No comments yet.