You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have class that is derived from EmailMessage, so that I can inject some logic into the EmailMessage.SendAndSaveCopy().
However, Save() and SendAndSaveCopy() fail when called from the derived class due to an XML serialization error:
The empty string '' is not a valid local name.
Looking into the source code, this is because ServiceObjectDefinitionAttribute is missing from the derived class. Because this attribute is internal, I cannot add the attribute to my derived class to get past the XML serialization error.
My derived class is fairly straightforward, which demonstrates the exception that is thrown when calling base.SendAndSaveCopy()
public class CustomerEmailMessage : EmailMessage
{
public CustomerEmailMessage(ExchangeService service) : base(service){}
public new void SendAndSaveCopy(){
{
if (isEnabled)
{
base.SendAndSaveCopy();
}
}
}
The text was updated successfully, but these errors were encountered:
nathandace
changed the title
Item.Save failed on derived class
Item.Save throws exception on derived class
Jun 17, 2016
I have class that is derived from EmailMessage, so that I can inject some logic into the EmailMessage.SendAndSaveCopy().
However, Save() and SendAndSaveCopy() fail when called from the derived class due to an XML serialization error:
Looking into the source code, this is because ServiceObjectDefinitionAttribute is missing from the derived class. Because this attribute is internal, I cannot add the attribute to my derived class to get past the XML serialization error.
My derived class is fairly straightforward, which demonstrates the exception that is thrown when calling base.SendAndSaveCopy()
The text was updated successfully, but these errors were encountered: