~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Core/MonoDevelop.Core/Properties.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
                                writer.WriteStartElement (Node);
194
194
 
195
195
                        foreach (KeyValuePair<string, object> property in this.properties) {
 
196
                                //don't know how the value could be null but at least we can skip it to avoid breaking completely
 
197
                                if (property.Value == null)
 
198
                                        continue;
196
199
                                writer.WriteStartElement (PropertyNode);
197
200
                                writer.WriteAttributeString (KeyAttribute, property.Key);
198
201
                                
201
204
                                } else if (property.Value is ICustomXmlSerializer) {
202
205
                                        ((ICustomXmlSerializer)property.Value).WriteTo (writer);
203
206
                                } else {
204
 
                                        if (property.Value.GetType () != typeof(string) && property.Value.GetType ().IsClass) {
 
207
                                        if (!(property.Value is string) && property.Value.GetType ().IsClass) {
205
208
                                                XmlSerializer serializer = new XmlSerializer (property.Value.GetType ());
206
209
                                                serializer.Serialize (writer, property.Value);
207
210
                                        } else {