Example #1
0
        /// <summary>
        /// Saves the instance metadata for the given instance ID.
        /// </summary>
        /// <param name="instanceId"></param>
        /// <param name="metadata"></param>
        void SaveInstanceMetadata(Guid instanceId, IDictionary <XName, InstanceValue> metadata)
        {
            Contract.Requires <ArgumentNullException>(metadata != null);

            foreach (var kvp in metadata)
            {
                state.SetInstanceMetadata(kvp.Key.ToString(), ToSerializableObject(kvp.Value.Value));
            }
        }
        /// <summary>
        /// Saves the instance metadata for the given instance ID.
        /// </summary>
        /// <param name="instanceId"></param>
        /// <param name="metadata"></param>
        void SaveInstanceMetadata(Guid instanceId, IDictionary <XName, InstanceValue> metadata)
        {
            if (metadata == null)
            {
                throw new ArgumentNullException(nameof(metadata));
            }

            foreach (var kvp in metadata)
            {
                state.SetInstanceMetadata(kvp.Key.ToString(), ToSerializableObject(kvp.Value.Value));
            }
        }