NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ComponentModelPersister Members

Public:

Constructor

ComponentModelPersister Constructor [To be supplied.]

Properties

CanReload (inherited from CodePersister) This can be called to check if the persister can be reloaded. This will return true by default, thereby forcing a reload of the designer.

Methods

Dispose Disposes of the resources (other than memory) used by the ComponentModelPersister.
DoesHandlerExist Gets whether or not a handler for the specified event descriptor exists in the code.
Equals (inherited from Object) Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality).
GetCompatibleMethods Gets the names of methods that have signatures compatible with the specified delegate class.
GetComponentCode Generates the source code for the specified subcomponents.
GetComponentsFromCode [To be supplied.]
GetDoesFieldExist Determines if a field of the specified name exists in the code.
GetDoesMethodExist Determines if a method of the specified name exists in the code.
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetNameFromReference (inherited from CodePersister) Returns the name of the given reference. This will look up in either the referenceService or the component's site.
GetReferenceFromName [To be supplied.]
GetType (inherited from Object) Gets the Type of the Object.
Init Initializes this persister with the specified host and sourceFile.
Load Called when the source file should be reparsed. This should only populate the designer host the first time it is called. Subclasses must provide an implementation.
NavigateToEvent Overloaded. [To be supplied.]
ToString (inherited from Object) Returns a String that represents the current Object.

Protected:

Properties

BaseComponent The base component.
DocumentCodeClass The class that is currently in the designer for editing.
FirstLoadException (inherited from CodePersister) First load exception that occurs. This allows the parsing to continue on and still report the first failure.
Host (inherited from CodePersister) IDesignerHost this persister should communicate with.
IgnoreCase (inherited from CodePersister) [To be supplied.]
SourceFile The source file to persist to.
ValueProviderSorter (inherited from CodePersister) [To be supplied.]

Methods

AlwaysPersist (inherited from CodePersister) If any value provider indicates that a value is "UserSelected" then we must force the persistence of the value.
AppendInitMethodStatements Provides a way for subclasses to append methods to the initMethod function. The base.AppendInitMethodStatements method should be called to do this.
BeginDepersisting (inherited from CodePersister) Notifies value providers that depersisting has begun.
BeginPersisting (inherited from CodePersister) Notifies value providers that persisting has begun.
CreateComponentInstance (inherited from CodePersister) Create the component specified and initialize its Modifiers property.
CreateDeclaration [To be supplied.]
CreateExpressionFromPropertyValue (inherited from CodePersister) Creates an expression value object from a PropertyValue. This will perform a deep scan on the PropertyValue and convert any nested object creates, array creates, name references, or constants.

For more information on values and expressions see the ICodeSourceFile documentation.

CreateExpressionFromValue (inherited from CodePersister) Creates an expression from a component/propertyName combination. This should only be used for property sets.
CreateValueFromExpression (inherited from CodePersister) Creates a value from an expression object returned form the CodeSense APIs. This will take the various expressions and execute them, so to say. For example, if you pass in a ICodeObjectCreateExpression for value and it refers to the Point class, then a Point object will be returned.

For more information on values and expression see the ICodeSourceFile documentation.

DeclareComponent (inherited from CodePersister) This is used during code parsing to declare a given data member. We declare the member, and then we create an instance of this data member. This will throw an exception if the data member has already been declared.
EndDepersisting (inherited from CodePersister) Notifies value providers that depersisting has completed.
EndPersisting (inherited from CodePersister) Notifies value providers that persisting has completed.
Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere.
FindInitMethod Finds the initialization method for this class.
Generate Generates the source code for the document.
GenerateComponentParenting Generates any parenting statemetns for the specified control.
GenerateEvent Generates a single event hookup method for the initialization method.
GenerateEvents Generates the code for the bound events of the control. Subclasses can override if their persistence mechanism is different (e.g. Web Forms)
GenerateExtenderSet Generates a single property set statement for an extender property.
GenerateHierarchyForObject [To be supplied.]
GenerateInitMethod Generates the initialization method for persistance.
GenerateMemberInstanceCreation Generates a single member create statement. This is used to construct objects inside of InitForm, instead of in the data member declaration.
GeneratePropertySet Overloaded. [To be supplied.]
GenerateResourcesDecl Generates the resource creation statement.
GenerateUpdateDataMembers Updates the modifiers on data members if they have changed.
GetComponentName Gets the name of the specified component.
GetServiceObject Searches for the requested service.
GetValueProviderDeclarations (inherited from CodePersister) Returns the array of value provider local variable declarations.
IsValueProviderDeclaration (inherited from CodePersister) Determines if the specified statement is a the local declaration for a value provider.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.
ParseComponentDeclarations Walks through the list of data members, finds all that implement IComponent and adds them to the Host.
ParseEventAdd Parses a single event add statement.
ParseExtenderSet Parses a single extender property set statement.
ParseInitMethod Parses all the statements in the init method.
ParseInitMethodMethod Parses a single method invoke inside of the init method. Subclasses should call base.ParseInitMethodMethod(...). You can choose to call super before or after custom parsing, but you should only call it if you want the default parsing to occur.
ParseMethodInvoke Parses a single no-arg method invoke of any name
ParsePropertySet Parses a single property set statement.
PersistNamedResource (inherited from CodePersister) Creates an expression from a name/value pair.
RemoveDeclaration Called when the designer host fires the OnComponentRemove event.
ShouldPersist Helper function to determine if a property should be persisted.

See Also

ComponentModelPersister Class | System.ComponentModel.Design Namespace