Mercurial > pub > bltoolkit
comparison Source/EditableObjects/EditableObjectT.cs @ 0:f990fcb411a9
Копия текущей версии из github
author | cin |
---|---|
date | Thu, 27 Mar 2014 21:46:09 +0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f990fcb411a9 |
---|---|
1 using System; | |
2 | |
3 using BLToolkit.Reflection; | |
4 | |
5 namespace BLToolkit.EditableObjects | |
6 { | |
7 [Serializable] | |
8 public abstract class EditableObject<T> : EditableObject | |
9 where T : EditableObject<T> | |
10 { | |
11 #region CreateInstance | |
12 | |
13 public static T CreateInstance() | |
14 { | |
15 return TypeAccessor.CreateInstanceEx<T>(); | |
16 } | |
17 | |
18 #endregion | |
19 | |
20 #region Clone | |
21 | |
22 public virtual T Clone() | |
23 { | |
24 return (T)TypeAccessor.Copy(this); | |
25 } | |
26 | |
27 #endregion | |
28 | |
29 #region Copy | |
30 | |
31 public void CopyTo(T dest) | |
32 { | |
33 TypeAccessor.Copy(this, dest); | |
34 } | |
35 | |
36 #endregion | |
37 } | |
38 } |