9using System.ComponentModel;
23 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Naming",
"CA1710:IdentifiersShouldHaveCorrectSuffix")]
30 #region Core Implementation
40 if (item.
Key.Equals(key))
54 if (item.
Value.Equals(value))
67 if (item.
Key.Equals(key))
80 if (item.
Value.Equals(value))
98 if (item !=
null && item.
Value.Equals(value))
120 if (item !=
null && item.
Key.Equals(key))
151 #region NameValuePair class
162#if (ANDROID || IOS) || NETFX_CORE
185 get {
return _value; }
205 return _value.ToString();
216 base.OnGetState(info, mode);
217 info.
AddValue(
"NameValuePair._key", _key);
218 info.
AddValue(
"NameValuePair._value", _value);
229 base.OnSetState(info, mode);
230 _key = info.GetValue<K>(
"NameValuePair._key");
231 _value = info.GetValue<V>(
"NameValuePair._value");
240 object ICloneable.Clone()
249 [EditorBrowsable(EditorBrowsableState.Advanced)]
252 return Core.ObjectCloner.Clone(
this);
267 private void DataPortal_Update()
272 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Usage",
"CA1801:ReviewUnusedParameters", MessageId =
"criteria")]
274 private void DataPortal_Delete(
object criteria)
284 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Naming",
"CA1707:IdentifiersShouldNotContainUnderscores", MessageId =
"Member")]
285 [EditorBrowsable(EditorBrowsableState.Advanced)]
296 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Naming",
"CA1707:IdentifiersShouldNotContainUnderscores", MessageId =
"Member")]
297 [EditorBrowsable(EditorBrowsableState.Advanced)]
309 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Naming",
"CA1707:IdentifiersShouldNotContainUnderscores", MessageId =
"Member")]
310 [EditorBrowsable(EditorBrowsableState.Advanced)]
318 #region IDataPortalTarget Members
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 object.
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 object.
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.
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.
StateMode
Indicates the reason the MobileFormatter functionality has been invoked.
@ Serializable
Prevents updating or inserting until the transaction is complete.