Change more places to .net standard capitalization rules.
authorDean
Mon, 10 Oct 2016 09:36:49 +0200
changeset 1359ead02dab7392
parent 1358 14f011411897
child 1360 697801c205db
Change more places to .net standard capitalization rules.
PEPAttachment.cs
PEPMessage.cs
ThisAddIn.cs
     1.1 --- a/PEPAttachment.cs	Mon Oct 10 09:33:43 2016 +0200
     1.2 +++ b/PEPAttachment.cs	Mon Oct 10 09:36:49 2016 +0200
     1.3 @@ -32,10 +32,10 @@
     1.4          /// </summary>
     1.5          public event PropertyChangedEventHandler PropertyChanged;
     1.6  
     1.7 -        private string _ContentID;
     1.8 +        private string _ContentId;
     1.9          private byte[] _Data;
    1.10          private string _FileName;
    1.11 -        private string _MIMEType;
    1.12 +        private string _MimeType;
    1.13          private byte[] _Tag;
    1.14  
    1.15          private static object                   mutexCache = new object();
    1.16 @@ -52,10 +52,10 @@
    1.17          /// </summary>
    1.18          public PEPAttachment()
    1.19          {
    1.20 -            this._ContentID = null;
    1.21 +            this._ContentId = null;
    1.22              this._Data = null;
    1.23              this._FileName = null;
    1.24 -            this._MIMEType = null;
    1.25 +            this._MimeType = null;
    1.26              this._Tag = null;
    1.27          }
    1.28  
    1.29 @@ -66,10 +66,10 @@
    1.30          /// <param name="data">The data array to build from.</param>
    1.31          public PEPAttachment(byte[] data)
    1.32          {
    1.33 -            this._ContentID = null;
    1.34 +            this._ContentId = null;
    1.35              this._Data = data;
    1.36              this._FileName = null;
    1.37 -            this._MIMEType = null;
    1.38 +            this._MimeType = null;
    1.39              this._Tag = null;
    1.40          }
    1.41  
    1.42 @@ -80,10 +80,10 @@
    1.43          /// <param name="b">The blob to build from.</param>
    1.44          public PEPAttachment(Blob b)
    1.45          {
    1.46 -            this._ContentID = null;
    1.47 +            this._ContentId = null;
    1.48              this._Data = b.Value;
    1.49              this._FileName = b.Filename;
    1.50 -            this._MIMEType = b.MimeType;
    1.51 +            this._MimeType = b.MimeType;
    1.52              this._Tag = null;
    1.53          }
    1.54  
    1.55 @@ -93,10 +93,10 @@
    1.56          /// <param name="attachment">The Outlook attachment to build from.</param>
    1.57          public PEPAttachment(Outlook.Attachment attachment)
    1.58          {
    1.59 -            this._ContentID = (string)MapiHelper.GetProperty(attachment, MapiProperty.PidTagAttachContentId);
    1.60 +            this._ContentId = (string)MapiHelper.GetProperty(attachment, MapiProperty.PidTagAttachContentId);
    1.61              this._FileName = attachment.FileName;
    1.62 -            this._MIMEType = (string)MapiHelper.GetProperty(attachment, MapiProperty.PidTagAttachMimeTag);
    1.63 -            this._Data = PEPAttachment.GetData(attachment, ref this._FileName, ref this._MIMEType);
    1.64 +            this._MimeType = (string)MapiHelper.GetProperty(attachment, MapiProperty.PidTagAttachMimeTag);
    1.65 +            this._Data = PEPAttachment.GetData(attachment, ref this._FileName, ref this._MimeType);
    1.66              this._Tag = (byte[])MapiHelper.GetProperty(attachment, MapiProperty.PidTagAttachTag);
    1.67          }
    1.68  
    1.69 @@ -110,13 +110,13 @@
    1.70          /// Gets or sets the unique ID (within message) of the attachment.
    1.71          /// This matches a corresponding "cid:" URI schema reference in the HTML body of the Message object.
    1.72          /// </summary>
    1.73 -        public string ContentID
    1.74 +        public string ContentId
    1.75          {
    1.76 -            get { return (this._ContentID); }
    1.77 +            get { return (this._ContentId); }
    1.78              set
    1.79              {
    1.80 -                this._ContentID = value;
    1.81 -                this.RaisePropertyChangedEvent(nameof(this.ContentID));
    1.82 +                this._ContentId = value;
    1.83 +                this.RaisePropertyChangedEvent(nameof(this.ContentId));
    1.84              }
    1.85          }
    1.86  
    1.87 @@ -153,13 +153,13 @@
    1.88          /// <summary>
    1.89          /// Gets or sets the MIME type of the attachment.
    1.90          /// </summary>
    1.91 -        public string MIMEType
    1.92 +        public string MimeType
    1.93          {
    1.94 -            get { return (this._MIMEType); }
    1.95 +            get { return (this._MimeType); }
    1.96              set
    1.97              {
    1.98 -                this._MIMEType = value;
    1.99 -                this.RaisePropertyChangedEvent(nameof(this.MIMEType));
   1.100 +                this._MimeType = value;
   1.101 +                this.RaisePropertyChangedEvent(nameof(this.MimeType));
   1.102              }
   1.103          }
   1.104  
   1.105 @@ -369,7 +369,7 @@
   1.106              Blob b = new Blob();
   1.107              b.Value = (this._Data != null ? this._Data : new byte[0]);
   1.108              b.Filename = this._FileName;
   1.109 -            b.MimeType = this._MIMEType;
   1.110 +            b.MimeType = this._MimeType;
   1.111  
   1.112              return (b);
   1.113          }
   1.114 @@ -411,10 +411,10 @@
   1.115                  return (false);
   1.116              }
   1.117  
   1.118 -            if (Comparisons.Equals(this.ContentID, obj.ContentID) &&
   1.119 +            if (Comparisons.Equals(this.ContentId, obj.ContentId) &&
   1.120                  Comparisons.Equals(this.Data, obj.Data) &&
   1.121                  Comparisons.Equals(this.FileName, obj.FileName) &&
   1.122 -                Comparisons.Equals(this.MIMEType, obj.MIMEType) &&
   1.123 +                Comparisons.Equals(this.MimeType, obj.MimeType) &&
   1.124                  Comparisons.Equals(this.Tag, obj.Tag))
   1.125              {
   1.126                  return (true);
   1.127 @@ -432,7 +432,7 @@
   1.128              byte[] dataCopy;
   1.129              PEPAttachment copy = new PEPAttachment();
   1.130  
   1.131 -            copy.ContentID = (this._ContentID == null ? null : string.Copy(this._ContentID));
   1.132 +            copy.ContentId = (this._ContentId == null ? null : string.Copy(this._ContentId));
   1.133  
   1.134              // Copy data
   1.135              dataCopy = null;
   1.136 @@ -447,7 +447,7 @@
   1.137  
   1.138              copy.Data = dataCopy;
   1.139              copy.FileName = (this._FileName == null ? null : string.Copy(this._FileName));
   1.140 -            copy.MIMEType = (this._MIMEType == null ? null : string.Copy(this._MIMEType));
   1.141 +            copy.MimeType = (this._MimeType == null ? null : string.Copy(this._MimeType));
   1.142  
   1.143              // Copy tag
   1.144              dataCopy = null;
   1.145 @@ -599,14 +599,14 @@
   1.146                  newAttachment = attachments.Add(tempFile, Outlook.OlAttachmentType.olByValue);
   1.147  
   1.148                  // Set the MIME type
   1.149 -                if (string.IsNullOrWhiteSpace(this._MIMEType))
   1.150 +                if (string.IsNullOrWhiteSpace(this._MimeType))
   1.151                  {
   1.152                      // Undefined
   1.153                      MapiHelper.SetProperty(newAttachment, MapiProperty.PidTagAttachMimeTag, "application/octet-stream");
   1.154                  }
   1.155                  else
   1.156                  {
   1.157 -                    MapiHelper.SetProperty(newAttachment, MapiProperty.PidTagAttachMimeTag, this._MIMEType);
   1.158 +                    MapiHelper.SetProperty(newAttachment, MapiProperty.PidTagAttachMimeTag, this._MimeType);
   1.159                  }
   1.160  
   1.161                  // Set the attachment tag
   1.162 @@ -616,9 +616,9 @@
   1.163                  }
   1.164  
   1.165                  // Set the content ID
   1.166 -                if (string.IsNullOrWhiteSpace(this._ContentID) == false)
   1.167 +                if (string.IsNullOrWhiteSpace(this._ContentId) == false)
   1.168                  {
   1.169 -                    MapiHelper.SetProperty(newAttachment, MapiProperty.PidTagAttachContentId, this._ContentID);
   1.170 +                    MapiHelper.SetProperty(newAttachment, MapiProperty.PidTagAttachContentId, this._ContentId);
   1.171                  }
   1.172  
   1.173                  // Delete temp directory for attachments
     2.1 --- a/PEPMessage.cs	Mon Oct 10 09:33:43 2016 +0200
     2.2 +++ b/PEPMessage.cs	Mon Oct 10 09:36:49 2016 +0200
     2.3 @@ -1509,7 +1509,7 @@
     2.4                      newAttachment = new PEPAttachment()
     2.5                      {
     2.6                          Data = data.ToArray(),
     2.7 -                        MIMEType = "multipart/signed",
     2.8 +                        MimeType = "multipart/signed",
     2.9                          Tag = MapiPropertyValue.PidTagAttachTagMIME
    2.10                      };
    2.11                  }
    2.12 @@ -1553,7 +1553,7 @@
    2.13              // Modify CIDs for all attachments and store modified CIDs in the dictionary
    2.14              for (int i = 0; i < this._Attachments.Count; i++)
    2.15              {
    2.16 -                currCID = this._Attachments[i].ContentID;
    2.17 +                currCID = this._Attachments[i].ContentId;
    2.18                  currFileName = this._Attachments[i].FileName;
    2.19  
    2.20                  if (string.IsNullOrEmpty(currCID))
    2.21 @@ -1580,7 +1580,7 @@
    2.22                      modifiedCIDs.Add(currCID, newCID);
    2.23                  }
    2.24  
    2.25 -                this._Attachments[i].ContentID = newCID;
    2.26 +                this._Attachments[i].ContentId = newCID;
    2.27              }
    2.28  
    2.29              /* Process the HTML body replacing all modified CIDs
    2.30 @@ -2357,8 +2357,8 @@
    2.31              bool result = false;
    2.32  
    2.33              if ((attachment != null) &&
    2.34 -                (string.IsNullOrEmpty(attachment.MIMEType) == false) &&
    2.35 -                (string.Equals(attachment.MIMEType.Trim(), "application/pgp-encrypted", StringComparison.OrdinalIgnoreCase)))
    2.36 +                (string.IsNullOrEmpty(attachment.MimeType) == false) &&
    2.37 +                (string.Equals(attachment.MimeType.Trim(), "application/pgp-encrypted", StringComparison.OrdinalIgnoreCase)))
    2.38              {
    2.39                  // Allow any data
    2.40                  if ((attachment.Data != null) &&
    2.41 @@ -2381,8 +2381,8 @@
    2.42              bool result = false;
    2.43  
    2.44              if ((attachment != null) &&
    2.45 -                (string.IsNullOrEmpty(attachment.MIMEType) == false) &&
    2.46 -                (string.Equals(attachment.MIMEType.Trim(), "application/octet-stream", StringComparison.OrdinalIgnoreCase)))
    2.47 +                (string.IsNullOrEmpty(attachment.MimeType) == false) &&
    2.48 +                (string.Equals(attachment.MimeType.Trim(), "application/octet-stream", StringComparison.OrdinalIgnoreCase)))
    2.49              {
    2.50                  // Require data to start with PGP text and be at least 100 bytes
    2.51                  if ((attachment.Data != null) &&
     3.1 --- a/ThisAddIn.cs	Mon Oct 10 09:33:43 2016 +0200
     3.2 +++ b/ThisAddIn.cs	Mon Oct 10 09:36:49 2016 +0200
     3.3 @@ -2627,7 +2627,7 @@
     3.4                          ownKey = new PEPAttachment();
     3.5                          ownKey.Data = System.Text.Encoding.UTF8.GetBytes(key);
     3.6                          ownKey.FileName = "pEpkey.asc";
     3.7 -                        ownKey.MIMEType = "application/octet-stream";
     3.8 +                        ownKey.MimeType = "application/octet-stream";
     3.9  
    3.10                          ownKey.AddTo(attachments);
    3.11                      }