|
|
browse.develop.com
Browse.develop.com is a community that was established to collect and
organize valuable web information. Our technical staff have selected and
indexed information and courses that they feel will help you stay
current on best practices across the SDLC.
|
8 Articles match "Static"
|
Related DevelopMentor Courses
|
MORE
|
|
Virtual Foundations of C# Programming and the .NET Framework (Part 1)
Static The static keyword is used with fields, methods, and types. Static fields are used to implement shared resources. Static methods are useful as utilities where the full power of an instance method is not required. Static types are convenient containers for static fields and methods. Examine core language features such as types, variables, and control constructs Use object-oriented features such as class, interface, protection, and inheritance Use properties to implement the private data/public accessor pattern Avoid dll conflicts during deployment Virtual Foundations of C# Programming and the .NET
DevelopMentor Courses
- Wednesday, February 17, 2010
Foundations of C# Programming and the .NET Framework
Static The static keyword is used with fields, methods, and types. Static fields are used to implement shared resources. Static methods are useful as utilities where the full power of an instance method is not required. Static types are convenient containers for static fields and methods. Examine core language features such as types, variables, and control constructs Use object-oriented features such as class, interface, protection, and inheritance Perform error notification and error handling using exceptions Use properties to implement the private data/public accessor pattern Use namespaces to group related types Use delegates and events to implement callbacks Override Object class methods such as ToString Avoid dll conflicts during deployment Use dynamic binding and polymorphism to write generic code (i.e.,
DevelopMentor Courses
- Friday, June 12, 2009
Intensive C++
Functions Learn functions, parameter passing, references, arrays, global and static variables, defaults, and inline. Scope Examine name collision issues, nested types, static members, and namespaces. Classes, Member Functions, and Protection Inheritance, Single, and Multiple Constructors and Destructors Overloading, Dynamic Binding, and Virtual Functions Polymorphism and Generic Programming Template Functions and Classes Exceptions and Error Handling Operator Overloading Dynamic Memory, Copy/Assignment, and Memory Management Type Conversion and Rtti Namespaces and Project Organization Efficiency Issues, Code Generation, and Inlining Function Objects, Pointers, and Callbacks Standard Library Iostreams, Strings, and Containers Effective Programming Idioms and Techniques Object-Oriented Programming,
DevelopMentor Courses
- Friday, June 12, 2009
|
113 Articles match "Static"
|
The Latest from DevelopMentor
|
MORE
|
|
Actors prototype in C#
namespace Concurrency.Actors
{
public interface IActor<T>
{
void Send(T message);
}
public class Actor<T> : IActor<T>
{
private BlockingCollection<T> _inbox = new BlockingCollection<T>();
private Func<T, bool> _handler;
private Thread _manager;
private void Manager()
{
while (_handler(_inbox.Take())) ;
}
public void Send(T message)
{
_inbox.Add(message);
}
private Actor(string n, Func<T, bool> h)
Handwaving
- Wednesday, March 3, 2010
WCF, WIF and Load Balancing (and a bit of Azure)
public class WebFarmSessionSecurityTokenHandler : SessionSecurityTokenHandler
{
public WebFarmSessionSecurityTokenHandler( X509Certificate2 protectionCertificate)
: base (CreateRsaTransforms(protectionCertificate))
{
}
private static ReadOnlyCollection
CreateRsaTransforms Pablo wrote a post yesterday
giving giving some background information on how session tokens are protected in WIF – here
some
www.leastprivilege.com
- Thursday, February 18, 2010
Securing WCF Data Services using WIF
static void Main( string []
args) This questions comes up every once in a while..
Since Since WCF Data Services is just a normal WCF service (using the web programming model),
all all the typical security APIs and extensibility points apply.
That That said, depending on your scenario
www.leastprivilege.com
- Monday, February 15, 2010
|
-
|
The Best from DevelopMentor
|
MORE
|
-
.NET Generics and static methods
If you know how generics work under the covers then I guess you will think I wouldn't be that stupid to write the code below, but If you are not completely up to speed with how it is implemented in the CLR then you may think the behaviour below is a little strange. using System.Collections.Generic; using System.Text; namespace Constraints { public class A { public static bool operator ==(A lhs, A rhs) { return true; } public static bool operator !=(A A lhs, A rhs) { return false; } } public class B : A { public static bool operator ==(B
.NET Mutterings
- Monday, July 3, 2006
-
The new Windows Workflow Foundation 4 runtime
It basically runs a workflow and prints a message when done: static void Main( string [] args)
{
using (WorkflowRuntime workflowRuntime = new WorkflowRuntime())
{
workflowRuntime.WorkflowCompleted += delegate ( object sender, WorkflowCompletedEventArgs e)
{
Console.WriteLine( "The workflow has completed." The same functionality in WF4 looks very different:
static void Main( string [] args)
{
WorkflowInstance myInstance = new WorkflowInstance(
The Problem Solver
- Tuesday, June 23, 2009
-
Some useful DateTime extensions
public static class DateTimeExtensions { ///
/// Return the date that is the
start static DateTime GetStartOfWeek( this DateTime date)
{ static DateTime GetStartOfLastWeek( this DateTime date)
{ static DateTime GetEndOfWeek( this DateTime date)
{ I’m doing some work where a user can select data based on choice like “This week”
and and “Last month”.
The Blomsma Code
- Thursday, August 20, 2009
-
WF4&WCF and message correlation
The input for both Receive activities will still be the same person class from the previous example and we will use the persons ID to route the messages. The new workflow definition looks like this: private static WorkflowElement CreateWorkflow()
{
var result = new Sequence();
var input = new Variable ();
result.Variables.Add(input);
XNamespace ns = "http://tempuri.org" ;
var handle1 = new Variable ();
result.Variables.Add(handle1);
var handle2
The Problem Solver
- Wednesday, September 2, 2009
-
Using Windows Workflow Foundation 4 Receive from an non WF client
Using these WCF definitions creating a simple console app that calls the workflow is a breeze.
static void Main( string [] args)
{
var binding = new BasicHttpBinding();
var endpoint = new EndpointAddress( "http://localhost:8090/Sequence1/Operation1" );
var factory = new ChannelFactory (binding, endpoint);
var proxy = factory.CreateChannel();
var request = new Operation1Request()
{
Value = "Test from a console." In a previous blog post I described how to use the WorkflowServiceHost and host a workflow with a Receive activity that waits for WCF messages.
The Problem Solver
- Wednesday, August 19, 2009
-
Combining WCF and WF4
Not quite sure if I like that as a service contract is supposed to be very much locked down. The code for the service workflow looks like this: private static WorkflowElement CreateWorkflow()
{
var result = new Sequence();
var input = new Variable ();
result.Variables.Add(input);
XNamespace ns = "http://tempuri.org" ;
var handle = new Variable ();
result.Variables.Add(handle);
var receive = new Receive()
{
OperationName
The Problem Solver
- Wednesday, August 5, 2009
-
Article: Avoiding 5 Common Pitfalls in Unit Testing
IsValidForMask(Mask, path))
{
throw new Exception(String.Format(
"Invalid Path '{0}' for Mask '{1}'", path, Mask));
}
}
internal static bool IsValidForMask(String mask, String path)
{
mask = mask.Replace(".", ".").Replace("*", Extras.*", "ExampleCode.HelloWorld");
AssertValidForMask(true, "ExampleCode.*", "ExampleCode.HelloWorld");
}
private static String Run(string mask, string path)
{
var gateway = new OptimizedGateway {Mask = mask};
var enviroment = new Dictionary ();
enviroment.Add("path",
Michael C. Kennedy's Weblog
- Thursday, August 6, 2009
|
|
|