9using System.Collections.Generic;
19 [System.Diagnostics.DebuggerNonUserCode]
25 private string _fieldBackedString = FieldBackedStringProperty.DefaultValue;
28 get {
return GetProperty<string>(FieldBackedStringProperty, _fieldBackedString); }
29 set { SetProperty<string>(FieldBackedStringProperty, ref _fieldBackedString, value); }
33 private int _f02 = F02Property.DefaultValue;
36 get {
return GetProperty<int>(F02Property, _f02); }
37 set { SetProperty<int>(F02Property, ref _f02, value); }
41 private string _f03 = F03Property.DefaultValue;
44 get {
return GetProperty<string>(F03Property, _f03); }
45 set { SetProperty<string>(F03Property, ref _f03, value); }
52 get {
return GetPropertyConvert<
Csla.
SmartDate,
string>(F04Property, _F04); }
53 set { SetPropertyConvert(F04Property, ref _F04, value); }
57 private bool _f05 = F05Property.DefaultValue;
60 get {
return GetProperty<bool>(F05Property, _f05); }
61 set { SetProperty<bool>(F05Property, ref _f05, value); }
65 private object _F06 =
string.Empty;
68 get {
return GetPropertyConvert<object, string>(F06Property, _F06); }
69 set { SetPropertyConvert<object, string>(F06Property, ref _F06, value); }
87 get {
return GetProperty<int>(M02Property); }
88 set { SetProperty<int>(M02Property, value); }
93 var p = M02Property as Core.IPropertyInfo;
94 LoadProperty(p, value);
97 private static Csla.
PropertyInfo<
string> M03Property = RegisterProperty(c => c.M03,
"field 3",
"n/a");
100 get {
return GetProperty<string>(M03Property); }
101 set { SetProperty<string>(M03Property, value); }
107 get {
return GetPropertyConvert<
Csla.
SmartDate,
string>(M04Property); }
108 set { SetPropertyConvert(M04Property, value); }
111 private static Csla.
PropertyInfo<
bool> M05Property = RegisterProperty<bool>(c => c.M05,
"field 5");
114 get {
return GetProperty(M05Property); }
115 set { SetProperty(M05Property, value); }
118 private static Csla.
PropertyInfo<
Guid> M06Property = RegisterProperty<Guid>(c => c.M06,
"field 6");
121 get {
return GetProperty(M06Property); }
122 set { SetProperty(M06Property, value); }
125 private static Csla.
PropertyInfo<
object> M07Property = RegisterProperty<object>(c => c.M07,
"field 7");
128 get {
return GetPropertyConvert<object, string>(M07Property); }
129 set { SetPropertyConvert<object, string>(M07Property, value); }
148 using (BypassPropertyChecks)
161 return LazyGetProperty(ManagedChildProperty, () => GetDataPortal<EditableGetSet>().Create());
171 return LazyGetProperty(ManagedChildListProperty, () => GetDataPortal<ChildList>().Create());
179 get {
return LazyGetProperty(LazyChildProperty, () => GetDataPortal<ChildList>().Create()); }
180 set { SetProperty(LazyChildProperty, value); }
185 get {
return base.EditLevel; }
197 #region Factory Methods
201 return dataPortal.
Create();
211 return dataPortal.
Fetch();
226 LoadProperty(M06Property,
null);
230 private void CreateChild()
232 LoadProperty(M06Property,
null);
236 private void DataPortal_Fetch()
238 LoadProperty(M06Property,
null);
242 private void DataPortal_FetchChild()
244 LoadProperty(M06Property,
null);
251 FieldManager.UpdateChildren();
258 FieldManager.UpdateChildren();
267 if(_fieldBackedString!=
null)
268 info.
AddValue(
"_fieldBackedString", _fieldBackedString);
278 base.OnGetState(info, mode);
283 if (info.
Values.ContainsKey(
"_fieldBackedString"))
284 _fieldBackedString = info.GetValue<
string>(
"_fieldBackedString");
285 if (info.
Values.ContainsKey(
"_f02"))
286 _f02 = info.GetValue<
int>(
"_f02");
287 if(info.
Values.ContainsKey(
"_f03"))
288 _f03 = info.GetValue<
string>(
"_f03");
289 if(info.
Values.ContainsKey(
"_f04"))
291 if (info.
Values.ContainsKey(
"_f05"))
292 _f05 = info.GetValue<
bool>(
"_f05");
294 base.OnSetState(info, mode);
299 #region Private Helper Methods
326 get {
return base.EditLevel; }
349 #region Factory Methods
353 return dataPortal.
Fetch();
360 private void DataPortal_Fetch()
377 internal void Insert()
382 internal void Update()
Provides consistent context information between the client and server DataPortal objects.
object GetRequiredService(Type serviceType)
Attempts to get service via DI using ServiceProviderServiceExtensions.GetRequiredService.
Maintains metadata about a property.
Object containing the serialization data for a specific object.
Dictionary< string, FieldData > Values
Dictionary containg field data.
void AddValue(string name, object value)
Adds a value to the serialization stream.
static EditableGetSet GetObject(IDataPortal< EditableGetSet > dataPortal)
EditableGetSet ManagedChild
static EditableGetSet GetChildObject(IChildDataPortal< EditableGetSet > dataPortal)
static EditableGetSet NewObject(IDataPortal< EditableGetSet > dataPortal)
static readonly PropertyInfo< string > _m08Property
static readonly PropertyInfo< string > ManagedStringFieldProperty
static EditableGetSet NewChildObject(IChildDataPortal< EditableGetSet > childDataPortal)
ChildList ManagedChildList
static readonly PropertyInfo< string > _m09Property
void LoadInternalAndPrivate(string value)
string ManagedStringField
bool ManagedStringFieldDirty
override void OnGetState(SerializationInfo info, Csla.Core.StateMode mode)
override void OnSetState(SerializationInfo info, Csla.Core.StateMode mode)
static PropertyInfo< string > DataProperty
EditableGetSetNFI(bool isChild)
static EditableGetSetNFI GetObject(IDataPortal< EditableGetSetNFI > dataPortal)
Interface defining the members of the child data portal type.
object CreateChild(params object[] criteria)
Called by a factory method in a business class to create a new object, which is loaded with default v...
object FetchChild(params object[] criteria)
Called by a factory method in a business class to retrieve an object, which is loaded with values fro...
Interface defining the members of the data portal type.
object Fetch(params object[] criteria)
Called by a factory method in a business class to retrieve an object, which is loaded with values fro...
object Create(params object[] criteria)
Called by a factory method in a business class to create a new object, which is loaded with default v...
@ Guid
Globally unique identifier / Guid
RelationshipTypes
List of valid relationship types between a parent object and another object through a managed propert...
@ Serializable
Prevents updating or inserting until the transaction is complete.
@ Update
Update operation (includes insert, update and delete self).
Provides a date data type that understands the concept of an empty date value.