Archive for May 2007
One more sample from the upcoming SDK:
Using the Configuration
To simplify the process of the creation of information cards and to increase the maintenance capabilities of applications the Information Card API provides support for the .NET Configuration. The <cardSpace> configuration section and the <newCard> configuration element can be used to predefine the information card’s properties in the application configuration file. The call to the static InformationCard.Create method will return then a new information card based on the predefined values.
Ok, instead of writing a long story I’ll just post two samples from the upcoming SDK pre-release:
The “Simplest” Information Card
In this sample you will be introduced to the Information Card API and the newtelligence.CardSpace.InformationCard class it provides.
To create a managed information card simply instantiate the InformationCard class using its default constructor, set the required properties and call one of the Save method’s overloads.
Working with Cards
This sample uses the code from the previous sample to create and save a simple managed card. Then a new instance of the InformationCard class is used to load a previously created card and change its properties. The sample code sets the name and specifies an image for the card as well as other properties. In addition it changes the Security Token Service to be used with the card, and the claims that the card supports. Finally, the card is saved to the file with the same name.