9using System.ComponentModel;
23 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Naming",
"CA1710:IdentifiersShouldHaveCorrectSuffix")]
44 #region Core Implementation
54 if (item.
Key.Equals(key))
68 if (item.
Value.Equals(value))
81 if (item.
Key.Equals(key))
94 if (item.
Value.Equals(value))
112 if (item !=
null && item.
Value.Equals(value))
134 if (item !=
null && item.
Key.Equals(key))
163 #region NameValuePair class
174#if (ANDROID || IOS) || NETFX_CORE
197 get {
return _value; }
217 return _value.ToString();
228 base.OnGetState(info, mode);
229 info.
AddValue(
"NameValuePair._key", _key);
230 info.
AddValue(
"NameValuePair._value", _value);
241 base.OnSetState(info, mode);
242 _key = info.GetValue<K>(
"NameValuePair._key");
243 _value = info.GetValue<V>(
"NameValuePair._value");
252 object ICloneable.Clone()
261 [EditorBrowsable(EditorBrowsableState.Advanced)]
279 private void DataPortal_Update()
284 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Usage",
"CA1801:ReviewUnusedParameters", MessageId =
"criteria")]
286 private void DataPortal_Delete(
object criteria)
296 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Naming",
"CA1707:IdentifiersShouldNotContainUnderscores", MessageId =
"Member")]
297 [EditorBrowsable(EditorBrowsableState.Advanced)]
308 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Naming",
"CA1707:IdentifiersShouldNotContainUnderscores", MessageId =
"Member")]
309 [EditorBrowsable(EditorBrowsableState.Advanced)]
321 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Naming",
"CA1707:IdentifiersShouldNotContainUnderscores", MessageId =
"Member")]
322 [EditorBrowsable(EditorBrowsableState.Advanced)]
330 #region IDataPortalTarget Members
Provides consistent context information between the client and server DataPortal objects.
ApplicationContext(ApplicationContextAccessor applicationContextAccessor)
Creates a new instance of the type
Inherit from this base class to easily create a serializable class.
A readonly version of BindingList(Of T)
Provides information about the DataPortal call.
Contains a key and value pair.
override string ToString()
Returns a string representation of the value for this item.
NameValuePair(K key, V value)
Creates an instance of the type.
V Value
The Value corresponding to the key/name.
override void OnGetState(SerializationInfo info, StateMode mode)
Override this method to manually get custom field values from the serialization stream.
override void OnSetState(SerializationInfo info, StateMode mode)
Override this method to manually set custom field values into the serialization stream.
K Key
The Key or Name value.
This is the base class from which readonly name/value collections should be derived.
bool ContainsValue(V value)
Gets a value indicating whether the list contains the specified value.
virtual void Initialize()
Override this method to set up event handlers so user code in a partial class can respond to events r...
NameValuePair GetItemByValue(V value)
Get the item for the first matching value in the collection.
NameValueListBase()
Creates an instance of the type.
K Key(V value)
Returns the key corresponding to the first occurance of the specified value in the list.
virtual object GetClone()
Creates a clone of the object.
NameValuePair GetItemByKey(K key)
Get the item for the first matching key in the collection.
virtual void DataPortal_OnDataPortalInvokeComplete(DataPortalEventArgs e)
Called by the server-side DataPortal after calling the requested DataPortal_XYZ method.
V Value(K key)
Returns the value corresponding to the specified key.
NameValueListBase< K, V > Clone()
Creates a clone of the object.
ApplicationContext ApplicationContext
Gets the current ApplicationContext
virtual void DataPortal_OnDataPortalInvoke(DataPortalEventArgs e)
Called by the server-side DataPortal prior to calling the requested DataPortal_XYZ method.
virtual void DataPortal_OnDataPortalException(DataPortalEventArgs e, Exception ex)
Called by the server-side DataPortal if an exception occurs during data access.
bool ContainsKey(K key)
Gets a value indicating whether the list contains the specified key.
A strongly-typed resource class, for looking up localized strings, etc.
static string DeleteNotSupportedException
Looks up a localized string similar to Invalid operation - delete not allowed.
static string UpdateNotSupportedException
Looks up a localized string similar to Invalid operation - update not allowed.
Object containing the serialization data for a specific object.
void AddValue(string name, object value)
Adds a value to the serialization stream.
This is the core interface implemented by all CSLA .NET base classes.
Implement if a class requires access to the CSLA ApplicationContext type.
StateMode
Indicates the reason the MobileFormatter functionality has been invoked.
@ Serializable
Prevents updating or inserting until the transaction is complete.