Dev2.DynamicServices.DsfDataObject.CollectValues C# (CSharp) Method

CollectValues() protected method

A host invokes this method on a custom persistence participant to collect read-write values and write-only values, to be persisted.
protected CollectValues ( object>.IDictionary &readWriteValues, object>.IDictionary &writeOnlyValues ) : void
readWriteValues object>.IDictionary The read-write values to be persisted.
writeOnlyValues object>.IDictionary The write-only values to be persisted.
return void
        protected override void CollectValues(out IDictionary<XName, object> readWriteValues,
            out IDictionary<XName, object> writeOnlyValues)
        {
            // Sashen: 05-07-2012
            // These methods are used on completion of any workflow application instance
            // The Data Transfer object will need to be serialized to the persistence store
            // as we require the dataTransfer object once the workflow resumes as there may be parent workflows to bring out
            // of perstistence, so...

            // We serialize the DataTransfer object into the persistance store XAML  

            readWriteValues = new Dictionary<XName, object>();

            foreach (PropertyInfo pi in typeof (IDSFDataObject).GetProperties())
            {
                readWriteValues.Add(_dSfDataObjectNs.GetName(pi.Name).LocalName, pi.GetValue(this, null));
            }

            writeOnlyValues = null;
        }