protected override Dictionary <string, IPropertyTransform> gatherProperties() { //Add known properties with special treatment //other properties are not allways present. If they are present add them and write with NoActionTransform //Use NullTransform for read only properties that do not should be written Dictionary <string, IPropertyTransform> propsToWrite = new Dictionary <string, IPropertyTransform>(); NullTransform nullTransform = new NullTransform(); NoActionDataTypeTransoform noActionTransform = new NoActionDataTypeTransoform(); propsToWrite.Add("Name", new FileNameDataTypeTransform()); propsToWrite.Add("Transactions", nullTransform); propsToWrite.Add("RecordsAffected", nullTransform); propsToWrite.Add("Build", nullTransform); propsToWrite.Add("Updatable", nullTransform); propsToWrite.Add("Connection", nullTransform); propsToWrite.Add("Version", nullTransform); dao.Database db = App.Application.CurrentDb(); foreach (dao.Property prop in db.Properties) { if (!propsToWrite.ContainsKey(prop.Name)) { propsToWrite.Add(prop.Name, noActionTransform); } } return(propsToWrite); }
protected override Dictionary <string, IPropertyTransform> gatherProperties() { Dictionary <string, IPropertyTransform> propsToWrite = new Dictionary <string, IPropertyTransform>(); NullTransform nullTransform = new NullTransform(); NoActionTransform noActionTransform = new NoActionTransform(); propsToWrite.Add("AccessVersion", nullTransform); propsToWrite.Add("Build", nullTransform); propsToWrite.Add("ProjVer", nullTransform); foreach (Access.AccessObjectProperty prop in App.Application.CurrentProject.Properties) { if (!propsToWrite.ContainsKey(prop.Name)) { propsToWrite.Add(prop.Name, noActionTransform); } } return(propsToWrite); }