protected override void SaveActiveSettingsToFileStream(System.IO.FileStream fs)
        {
            IBaseGraphableMappingManager activeMappingManager = activeMappingInfo.GetActiveGraphableEntryManager();

            activeMappingManager.RunFuncOnMappingEntry(activeMappingInfo.ActiveGraphableEntryId, (mappingEntry) =>
                                                       ContractSerializer.Serialize <CurveShapeInfo>(fs, mappingEntry.CurveShapeInfo));
        }
Exemplo n.º 2
0
        public void PersistToDisk(string in_filename)
        {
            Type       type = typeof(SerializableDictionary <string, EntityCollection>);
            FileStream fs   = new FileStream(in_filename, FileMode.Create, FileAccess.Write);

            // TODO: previously I thought that we had to use a DataContracSerializer for this.
            // However the old serializer appears to work also. Should investigate this.
            // Serializer.Serialize( type, data, fs );
            ContractSerializer.Serialize(type, data, fs, new Microsoft.Xrm.Sdk.KnownTypesResolver());
            fs.Close();
        }
Exemplo n.º 3
0
 /// <summary>
 /// Saves the state of the plugin to the stream. This will likely be called by a host when
 /// saving a file containing this plugin.
 /// </summary>
 public void WritePrograms(Stream stream, VstProgramCollection programs)
 {
     ContractSerializer.Serialize <SerializableRootType>(stream, getSerializableRootFromPlugin());
 }