Παρουσίαση με Ετικέτες

.NET hacking made easy
25 Ιανουαρίου 10 12:01 μμ | tolisss | 0 σχόλια   
I am in a mood this year so I decided to spend some time with a problem that I have left in the past. The problem I really wanted to use Runtime member for existent Types and also enable validation for those members. But for the reason i have describe in this post it was not possible, unless I change DevExpress source code and recompile (bad choice). DevExpress and any vendor could, for their own reasons not support your suggestion. Maybe for good or for bad I really not care, what I care is how to use Runtime member for existent Types with validation enable. So I will try a different approach I will use CThru which is an AOP open source interception framework based on the Typemock Open-AOP API to “ For any (past or future) object of type X in the system, make

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , ,
Multiple inheritance for .Net is here!!!
03 Ιουνίου 09 05:46 μμ | tolisss | 0 σχόλια   
I though i should post on this one cause its far more than interesting suppose you have a Customer that is a Person public class Person { public string Name { get; set; } } public class Customer : Person { } and implements 2 interfaces ICustomUser,ICustomer public interface ICustomUser { string Title { get; set; } } public interface ICustomer { string Title { get; set; } } one could write public class Customer : Person,ICustomUser,ICustomer { string ICustomUser.Title { get; set; } string ICustomer.Title { get; set; } } But in order to access the values of the properties Customer should be extended to something like public class Customer : Person,ICustomUser,ICustomer { private string customUserTitle; public string CustomUserTitle { get { return customUserTitle;

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , ,
Automatic properties for Xpo
02 Ιουνίου 09 05:23 πμ | tolisss | 0 σχόλια   
  The problem Xpo in order to support transactions implements some special kind of property setters like private string lastName; public string LastName { get { return lastName; } set { string oldValue = lastName; if (oldValue == value) return; lastName = value; OnChanged("Name", oldValue, value); } } Or a little more elegant like private string lastName; public string LastName { get { return lastName; } set { SetPropertyValue("LastName", ref lastName, value); } } Imagine you want to Design a fairly simple model like Customer –> Orders. A Customer should have LastName, FilrstName, Age and Orders as properties and Order only an Amount property. Using the above approach one could write the following code to describe the above model.

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , , ,

Search

Go

Το Ιστολόγιο

Ιστορικό Δημοσιεύσεων

Συνδρομές