public Dictionary <string, object> Encode() { var value = new Dictionary <string, object>(); value.Add(HttpSigningConstants.SignedObjectParameterNames.AccessToken, AccessToken); if (TimeStamp != null) { Logger.Debug("Encoding timestamp"); value.Add(HttpSigningConstants.SignedObjectParameterNames.TimeStamp, TimeStamp.Value); } if (Method != null) { Logger.Debug("Encoding method"); value.Add(HttpSigningConstants.SignedObjectParameterNames.Method, Method); } if (Host != null) { Logger.Debug("Encoding host"); value.Add(HttpSigningConstants.SignedObjectParameterNames.Host, Host); } if (Path != null) { Logger.Debug("Encoding path"); value.Add(HttpSigningConstants.SignedObjectParameterNames.Path, Path); } if (QueryParameters != null) { Logger.Debug("Encoding query params"); value.Add(HttpSigningConstants.SignedObjectParameterNames.HashedQueryParameters, QueryParameters.Encode()); } if (RequestHeaders != null) { Logger.Debug("Encoding request headers"); value.Add(HttpSigningConstants.SignedObjectParameterNames.HashedRequestHeaders, RequestHeaders.Encode()); } if (BodyHash != null) { Logger.Debug("Encoding body hash"); value.Add(HttpSigningConstants.SignedObjectParameterNames.HashedRequestBody, BodyHash); } return(value); }