private ClientIntentFlags?GetMissingItemIntent(CalendarValidationContext context, bool isNotOccurrence) { GetClientIntentType getClientIntentType = new GetClientIntentType(); getClientIntentType.GlobalObjectId = Convert.ToBase64String(context.BaseItem.GlobalObjectId.Bytes); if (isNotOccurrence) { getClientIntentType.StateDefinition = new NonEmptyStateDefinitionType { Item = new DeleteFromFolderStateDefinitionType() }; } else { getClientIntentType.StateDefinition = new NonEmptyStateDefinitionType { Item = new DeletedOccurrenceStateDefinitionType { OccurrenceDate = context.BaseItem.GlobalObjectId.Date.UniversalTime, IsOccurrencePresent = false } }; } GetClientIntentResponseMessageType clientIntent = this.binding.GetClientIntent(getClientIntentType); this.calendarIntent = this.HandleGetClientIntentResponse(clientIntent); if (this.calendarIntent == null) { Globals.ConsistencyChecksTracer.TraceDebug((long)this.GetHashCode(), "GetClientIntent returned NULL."); return(null); } return(new ClientIntentFlags?((ClientIntentFlags)this.calendarIntent.Intent)); }
private ClientIntentType HandleGetClientIntentResponse(ResponseMessageType responseType) { if (responseType == null) { Globals.ConsistencyChecksTracer.TraceDebug((long)this.GetHashCode(), "GetClientIntent returned NULL responseType."); return(null); } if (responseType.ResponseCode != ResponseCodeType.NoError) { Globals.ConsistencyChecksTracer.TraceDebug <ResponseCodeType>((long)this.GetHashCode(), "Web request returned ResponseCodeType {0}.", responseType.ResponseCode); return(null); } GetClientIntentResponseMessageType getClientIntentResponseMessageType = responseType as GetClientIntentResponseMessageType; if (getClientIntentResponseMessageType == null) { Globals.ConsistencyChecksTracer.TraceDebug((long)this.GetHashCode(), "GetClientIntent web request returned NULL GetClientIntentResponseMessageType."); return(null); } return(getClientIntentResponseMessageType.ClientIntent); }
internal override ClientIntentFlags?GetLocationIntent(CalendarValidationContext context, GlobalObjectId globalObjectId, string organizerLocation, string attendeeLocation) { GetClientIntentType getClientIntentType = new GetClientIntentType(); getClientIntentType.GlobalObjectId = Convert.ToBase64String(globalObjectId.Bytes); getClientIntentType.StateDefinition = new NonEmptyStateDefinitionType { Item = new LocationBasedStateDefinitionType { OrganizerLocation = organizerLocation, AttendeeLocation = attendeeLocation } }; GetClientIntentResponseMessageType clientIntent = this.binding.GetClientIntent(getClientIntentType); this.calendarIntent = this.HandleGetClientIntentResponse(clientIntent); if (this.calendarIntent == null) { Globals.ConsistencyChecksTracer.TraceDebug((long)this.GetHashCode(), "GetClientIntent returned NULL."); return(null); } return(new ClientIntentFlags?((ClientIntentFlags)this.calendarIntent.Intent)); }