GOA - System.AppParameters

AppParameters Class


Provides methods for communicating between current application domain and another application via the parameters. This class cannot be inherited.

Definition

public sealed class AppParameters: Object

Members Table

MethodDescription
EqualsOverloaded. Compares two objects to determine if they are equal. (Inherited from Object)
GetHashCodeServes as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object)
GetTypeGets the Type of the current instance. (Inherited from Object)
ReferenceEqualsDetermines whether the specified Object instances are the same instance. (Inherited from Object)
ToStringReturns a String that represents the current Object. (Inherited from Object)
this[]Gets the value of the parameter.

Inheritance Hierarchy

Object
AppParameters

Examples

// This sample shows how to implement the AppParameters class.

 

using System;

using System.Diagnostics;

using System.Windows.Forms;

 

public class MyForm: System.Windows.Forms.Form

{

     static void Main()

     {

          Application.Run( new MyForm() );

     }

 

     public MyForm()

     {

          // Displays the parameters.

          Display_external_param("myparam1");

          Display_external_param("myparam2");

          Display_external_param("myparam3");

     }

 

     void Display_external_param( string name )

     {

          AppDomain app_domain= AppDomain.CurrentDomain;

 

          // value is used to get the AppParameters.

          string value= (string) app_domain.Parameters[name];

          if( value != null )

               Debug.WriteLine( "ExternalParam " +name+ " is " + value);

          else

               Debug.WriteLine( "ExternalParam " +name+ " has not been defined" );

     }

}

 

/*

<html><body leftmargin=0 topmargin=0>

<!-- saved from url=(0013)about:internet -->

<object

id="swfapp"

width="400"

height="300"

align="CENTER"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0"

classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000">

<param name="movie" value="bin/Debug/AppParameters.swf"/>

<param name="quality" value="high"/>

<param name="scale" value="noScale"/>

<param name="FlashVars" value="myparam1=abc&myparam2=xyz"/>

<param name="SeamlessTabbing" value="false"/>

<embed

src="bin/Debug/AppParameters.swf"

name="swfapp"

width="400"

height="300"

quality="high"

scale="noScale"

FlashVars=""

SeamlessTabbing="false"

swliveconnect="true"

pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"

type="application/x-shockwave-flash">

</embed>

</object>

</body></html>

*/

 

/* The output of the sample.

 

ExternalParam "myparam1" is "abc"

ExternalParam "myparam2" is "xyz"

ExternalParam "myparam3" has not been defined

/*

 

Class Information

NamespaceSystem
Flash Librarycorlib.scl
Flash Library Version2.0.0.2466
Silverlight LibrarySystem.Windows.Forms.dll



© 2003-2007 NETiKA Technologies. All rights reserved.