| ODP.NET . . . . . . . C# 2005 / .NET 3.5 . . . . . . . ODT |
|---|
| Oracle 11g / .NET integration |
|
| WCF |
|
Asynchronous Delegates "The .NET Framework allows you to call any method asynchronously. To do this you define a delegate with the same signature as the method you want to call; the common language runtime automatically defines BeginInvoke and EndInvoke methods for this delegate, with the appropriate signatures. The BeginInvoke method initiates the asynchronous call. It has the same parameters as the method you want to execute asynchronously, plus two additional optional parameters. The first parameter is an AsyncCallback delegate that references a method to be called when the asynchronous call completes. The second parameter is a user-defined object that passes information into the callback method. BeginInvoke returns immediately and does not wait for the asynchronous call to complete. BeginInvoke returns an IAsyncResult, which can be used to monitor the progress of the asynchronous call. The EndInvoke method retrieves the results of the asynchronous call. It can be called any time after BeginInvoke; if the asynchronous call has not completed, EndInvoke blocks the calling thread until it completes. " Sacha Barber
public delegate void MyDelegate(Label myControl, string myArg2);
private void Button_Click(object sender, EventArgs e)
{
object[] myArray = new object[2];
myArray[0] = new Label();
myArray[1] = "Enter a Value";
myTextBox.BeginInvoke(new MyDelegate(DelegateMethod), myArray);
}
public void DelegateMethod(Label myControl, string myCaption)
{
myControl.Location = new Point(16,16);
myControl.Size = new Size(80, 25);
myControl.Text = myCaption;
this.Controls.Add(myControl);
}
|
JSON, a common lightweight data-interchange format and a standard for Ajax communication, is faster than XML and easy to manipulate.
In .Net 3.5, WCF can support JSON but you need to change config file:
<service name="OrderService">
<endpoint contract="IOrders"
binding="webHttpBinding"
bindingConfiguration="jsonBinding"
address=""
behaviorConfiguration="jsonBehavior" />
</service>
<webHttpBinding>
<binding name="jsonBinding" messageEncoding="Json" />
</webHttpBinding>
<behaviors>
<endpointBehaviors>
<behavior name ="jsonBehavior">
<webScriptEnable />
</behavior>
</endpointBehaviors>
</behaviors>
While WCF uses SOAP as an underlying structure, WCF can be configured to process "plain" XML data that is not wrapped in a SOAP envelope. WCF can also be extended to support specific XML formats, such as ATOM (a popular RSS standard), and even non-XML formats, such as JavaScript Object Notation (JSON).
|
| C# 2005 / .NET 3.0 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Regular Expression | ||||||||||||||||||||
| "I Love Jack Daniels": Regular Expression | ||||||||||||||||||||
| Unit Test | ||||||||||||||||||||
| Tools and Frameworks | |||||||||||||||||||
| ||||||||||||||||||||
| Managed and unmanaged heap memory deallocation | ||||||||||||||||||||
| In .NET after deallocation of the memory the garbage collector compacts the heap by moving all remaining objects to form one contiguous block of memory. This compacting is what sets apart managed and unmanaged code. Microsoft believes that the strategy used by .NET increases the performance. This is because there is no search required when the memory is allocated. Compacted memory leads to less page swapping (Chapter 11. C#2005w.NET3.0). | ||||||||||||||||||||
| Connection from C# to Oracle | ||||||||||||||||||||
| René Steiner via ODBC | ||||||||||||||||||||
|
Collection: Extension Method sample: Implementation of Where operator | ||||||||||||||||||||
|
.
|
||||||||||||||||||||
|
LINQ - Language Integrated Query | ||||||||||||||||||||
|
. | ||||||||||||||||||||
| .NET Framework 3.5 - July 2007 | ||||||||||||||||||||
Home of[Microsoft .NET Framework 3.5 Beta 2]
| ||||||||||||||||||||
| [The Code Project: General C# Programming] |
| Online References |
|---|
| MicrosoftMSDN] |
| [The Code Project: General C# Programming] |
| [TechRepublic] |
| [ASP Free] |