System.IO.IsolatedStorage.INormalizeForIsolatedStorage Interface

Assembly: Mscorlib.dll
Namespace: System.IO.IsolatedStorage
Summary
Enables comparisons between an isolated store and an application domain and assembly's evidence.
C# Syntax:
public interface INormalizeForIsolatedStorage
Remarks
Isolated storage uses evidence about an assembly in order to identify it and provide it with a unique file storage location. When an assembly requests a store, its evidence (as presented by the host that loaded it) is processed and compared with the evidence used to create the existing stores. This determines if you need to create a new store or if one already exists for the assembly in question. Due to the comparison technique used, pieces of evidence that are functionally equivalent might not result in a true comparison if the serialized forms are not identical. When implementing custom evidence, consider whether this is the case for your evidence class and, if so, implement INormalizeForIsolatedStorage. For evidence that implements this interface, the INormalizeForIsolatedStorage.Normalize method is called and comparisons are based on the normalized copy of the object returned by that method.

Notes to implementors: Implement this interface when you are implementing custom evidence and need to determine if a store already exists. Serialized objects should not be used for comparisons in some instances, such as that of case sensitive strings. For example, www.MSN.com is equal to WWW.msn.com and will return a true when compared . To create an INormalizeForIsolatedStorage object, you need to implement the INormalizeForIsolatedStorage.Normalize method. Call the methods of this interface to normalize the instance before making comparisons between an assembly's evidence and currently existing isolated stores.
See also:
System.IO.IsolatedStorage Namespace

System.IO.IsolatedStorage.INormalizeForIsolatedStorage Member List:

Public Methods
Normalize When overridden in a derived class, returns a normalized copy of the object on which it is called.

System.IO.IsolatedStorage.INormalizeForIsolatedStorage Member Details

Method: Normalize()
Summary
When overridden in a derived class, returns a normalized copy of the object on which it is called.
C# Syntax:
object Normalize();
Return Value:
A normalized object that represents the instance on which this method was called. This instance can be a string, stream, or any serializable object.
Remarks


Notes to implementors: When you override this method and the object returned is a stream, it is assumed to be serialized and is compared directly to the serialized form of the evidence used to create existing stores. If the object returned is a string, it is considered the name of an isolated store and compared to the names of the existing stores. You typically call this method if you are writing a class derived from isolated storage and you need to check to see if isolated storage already exists for the current assembly.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.