public MessageContracts.LoadScalarResponse LoadScalar(MessageContracts.LoadScalarRequest request) { Type returnType = Type.GetType(request.ExpectedType); var response = new MessageContracts.LoadScalarResponse(); if (request.First == -1) response.result = LoadSingle.Invoke(this, new object[] { request.Query }); else response.result = LoadMany.Invoke(this, new object[] { request.Query, request.First, request.Max }); response.returnType = response.result.GetType().FullName; return response; }
/// <summary> /// This method contains the core implementation for generating the GeneratedCode /// instance. /// </summary> /// <remarks> /// This method decorates every type found in codeNamespace with a CodeTypeMemberExtension. /// And then it sends each type through series of ITypeFilters to figure out whether the type /// is a service contract, service type, client type, message contract or data contract. /// </remarks> private void ParseAndFilterCodeNamespace() { ITypeFilter dataContractTypeFilter = new DataContractTypeFilter(); ITypeFilter messageContractTypeFilter = new MessageContractTypeFilter(); ITypeFilter serviceContractTypeFilter = new ServiceContractTypeFilter(); ITypeFilter clientTypeTypeFilter = new ClientTypeTypeFilter(); ITypeFilter serviceTypeTypeFilter = new ServiceTypeTypeFilter(); for (int i = 0; i < codeNamespace.Types.Count; i++) { // Take a reference to the current CodeTypeDeclaration. CodeTypeDeclaration ctd = codeNamespace.Types[i]; // Create a new instance of CodeTypeMemberExtension to wrap // the current CodeTypeDeclaration. CodeTypeExtension typeExtension = new CodeTypeExtension(ctd); // Also wrap the inner CodeTypeMember(s) ExtendTypeMembers(typeExtension); // Here we execute the type filters in the highest to lowest probability order. if (dataContractTypeFilter.IsMatching(typeExtension)) { typeExtension.Kind = CodeTypeKind.DataContract; DataContracts.Add(typeExtension); continue; } if (messageContractTypeFilter.IsMatching(typeExtension)) { typeExtension.Kind = CodeTypeKind.MessageContract; MessageContracts.Add(typeExtension); continue; } if (serviceContractTypeFilter.IsMatching(typeExtension)) { typeExtension.Kind = CodeTypeKind.ServiceContract; ServiceContracts.Add(typeExtension); continue; } if (clientTypeTypeFilter.IsMatching(typeExtension)) { typeExtension.Kind = CodeTypeKind.ClientType; ClientTypes.Add(typeExtension); continue; } if (serviceTypeTypeFilter.IsMatching(typeExtension)) { typeExtension.Kind = CodeTypeKind.ServiceType; ServiceTypes.Add(typeExtension); continue; } UnfilteredTypes.Add(typeExtension); } }
public MessageContracts.LookupResponseMessage Find(MessageContracts.LookupRequestMessage request) { object value; using (OrganizationServiceProxy proxy = CRMHelper.Connect()) { ServiceContext context = new ServiceContext(proxy); value = (from s in context.CreateQuery(request.Lookup.Entity) where s[request.Lookup.IdField] == request.Lookup.Id select s[request.Lookup.Field]).FirstOrDefault(); } return new MessageContracts.LookupResponseMessage() { Value = value as string }; }
public void Notify(MessageContracts.StockNotifyRequestMessage request) { using (OrganizationServiceProxy proxy = CRMHelper.Connect()) { ServiceContext context = new ServiceContext(proxy); foreach(StockItemDataContract item in request.Items) { bool add = false; new_stock record = (from a in context.new_stockSet where a.new_vinnumber == item.Stock.new_vinnumber select a).FirstOrDefault(); if(record == null) { add = true; record = new new_stock(); } record.new_internalvehiclenumber = item.Stock.new_internalvehiclenumber; record.new_vinnumber = item.Stock.new_vinnumber; record.new_enginenumber = item.Stock.new_enginenumber; record.new_sapvehiclemodelcode = item.Stock.new_sapvehiclemodelcode; record.new_plantsap = item.Stock.new_plantsap; record.new_storagelocation = item.Stock.new_storagelocation; record.new_stockvalue = item.Stock.new_stockvalue; record.new_status = item.Stock.new_status; record.new_vehicleguid = item.Stock.new_vehicleguid; if(add) context.AddObject(record); else context.UpdateObject(record); } context.SaveChanges(); } }
static CheckOutStateMachine() { MessageContracts.Initialize(); }
/// <summary> /// Retrieves a <seealso cref="List{T}"/> of <seealso cref="MedicalAppointment"/> through the business logic objects /// for the provider specified /// </summary> /// <param name="request"> /// The request containing the id of the provider to retrieve the appointments for /// </param> /// <returns> /// A message that contains a <seealso cref="List{T}"/> of <seealso cref="MedicalAppointment"/> that was retrieved /// </returns> public override MessageContracts.MedicalAppointmentsMessage GetMedicalAppointmentsByProvider(MessageContracts.ProviderIdRequestMessage request) { return new MessageContracts.MedicalAppointmentsMessage { MedicalAppointments = appointmentsManager .GetMedicalAppointmentsByProvider( request.ProviderId, ServiceSecurityContext.Current.PrimaryIdentity) .ToList() }; }
static ReservationStateMachine() { MessageContracts.Initialize(); }
/// <summary> /// Retrieves a <seealso cref="List{T}"/> of <seealso cref="Provider"/> through the business logic objects /// for the account specified /// </summary> /// <param name="request"> /// The request containing the id of the account to retrieve the providers for /// </param> /// <returns> /// A message that contains a <seealso cref="List{T}"/> of <seealso cref="Provider"/> that was retrieved /// </returns> public override MessageContracts.ProvidersMessage GetProviderByAccount(MessageContracts.AccountIdMedicalRequestMessage request) { return new MessageContracts.ProvidersMessage { Providers = providerManager .GetProvidersByAccount( request.AccountId, ServiceSecurityContext.Current.PrimaryIdentity) .ToList() }; }
/// <summary> /// Updates a medical appointment through the business logic objects /// </summary> /// <param name="request"> /// The request containing the appointment to update /// </param> public override void UpdateMedicalAppointment(MessageContracts.MedicalAppointmentRequestMessage request) { appointmentsManager.UpdateMedicalAppointment(request.MedicalAppointment, ServiceSecurityContext.Current.PrimaryIdentity); }
/// <summary> /// Gets a facility through the business logic objects /// </summary> /// <param name="request"> /// The request containing the facility id of the facility to retrieve /// </param> /// <returns> /// An message containing the requested facility /// </returns> public override MessageContracts.FacilityMessage GetFacility(MessageContracts.FacilityIdRequestMessage request) { return new MessageContracts.FacilityMessage { Facility = facilityManager.GetFacilityById(request.FacilityId, ServiceSecurityContext.Current.PrimaryIdentity) }; }
/// <summary> /// Updates a provider through the business logic objects /// </summary> /// <param name="request"> /// The request containing the provider to update /// </param> public override void UpdateProvider(MessageContracts.ProviderRequestMessage request) { providerManager.UpdateProvider(request.Provider, ServiceSecurityContext.Current.PrimaryIdentity); }
/// <summary> /// Retrieves a <seealso cref="List{T}"/> of <seealso cref="Insurer"/> through the business logic objects /// for the account specified /// </summary> /// <param name="request"> /// The request containing the id of the account to retrieve the insurers for /// </param> /// <returns> /// A message that contains a <seealso cref="List{T}"/> of <seealso cref="Insurer"/> that was retrieved /// </returns> public override MessageContracts.InsurersMessage GetInsurersByAccount(MessageContracts.AccountIdInsuranceRequestMessage request) { return new MessageContracts.InsurersMessage { Insurers = insuranceManager .GetInsurers(ServiceSecurityContext.Current.PrimaryIdentity) .ToList() }; }
/// <summary> /// Updates a follow up to an authorization through the business logic objects /// </summary> /// <param name="request"> /// The request containing the follow up to delete /// </param> public override void UpdateAuthorizationFollowUp(MessageContracts.AuthorizationFollowUpRequestMessage request) { followUpManager.UpdateAuthorizationFollowUp(request.AuthorizationFollowUp, ServiceSecurityContext.Current.PrimaryIdentity); }
public void CreateNotify(MessageContracts.InvoiceCreateNotifyRequestMessage request) { //TODO: Implement logic here to update TALO invoice information. }
/// <summary> /// Retrieves an insurer through the business logic objects /// </summary> /// <param name="request"> /// The request containing the id of the insurer to retrieve /// </param> /// <returns> /// A message that contains the <seealso cref="Insurer"/> that was retrieved /// </returns> public override MessageContracts.InsurerMessage GetInsurer(MessageContracts.InsurerIdRequestMessage request) { return new MessageContracts.InsurerMessage { Insurer = insuranceManager.GetInsurerById(request.InsurerId, ServiceSecurityContext.Current.PrimaryIdentity) }; }
public void Update(MessageContracts.ShippingInformationUpdateRequestMessage request) { throw new NotImplementedException(); }
static BookStateMachine() { MessageContracts.Initialize(); }
public void StockAgeNotify(MessageContracts.VehicleStockAgeNotifyRequestMessage request) { //TODO: Implement Logic to update TALO stock age. }
/// <summary> /// Deletes an insurer through the business logic objects /// </summary> /// <param name="request"> /// The request containing the insurer to delete /// </param> public override void DeleteInsurer(MessageContracts.InsurerRequestMessage request) { insuranceManager.DeleteInsurer(request.Insurer, ServiceSecurityContext.Current.PrimaryIdentity); }
/// <summary> /// Retrieves a <seealso cref="List{T}"/> of <seealso cref="AuthorizationFollowUp"/> /// through the business logic objects for the account specified /// </summary> /// <param name="request"> /// The request containing the id of the account to retrieve the follow ups for /// </param> /// <returns> /// A message that contains the <seealso cref="AuthorizationFollowUp"/> that was retrieved /// </returns> public override MessageContracts.AuthorizationFollowUpsMessage GetAuthorizationFollowUpsByAccount(MessageContracts.AccountIdInsuranceRequestMessage request) { return new MessageContracts.AuthorizationFollowUpsMessage { AuthorizationFollowUps = followUpManager .GetAuthorizationFollowUpsByAccount( request.AccountId, ServiceSecurityContext.Current.PrimaryIdentity) .ToList() }; }
public void UpdateNotify(MessageContracts.MasterUpdateNotifyRequestMessage request) { //TODO: Implement Logic to Create/Update Master Data in TALO }
/// <summary> /// Retrieves an authorization follow up through the business logic objects /// </summary> /// <param name="request"> /// The request containing the id of the follow up to retrieve /// </param> /// <returns> /// A message that contains the <seealso cref="AuthorizationFollowUp"/> that was retrieved /// </returns> public override MessageContracts.AuthorizationFollowUpMessage GetAuthorizationFollowUp(MessageContracts.AuthorizationFollowUpIdRequestMessage request) { return new MessageContracts.AuthorizationFollowUpMessage { AuthorizationFollowUp = followUpManager .GetAuthorizationFollowUpById( request.AuthorizationFollowUpId, ServiceSecurityContext.Current.PrimaryIdentity) }; }
/// <summary> /// Retrieves a <seealso cref="List{T}"/> of <seealso cref="Facility"/> through the business logic objects /// for the account specified /// </summary> /// <param name="request"> /// The request containing the id of the account to retrieve the facilities for /// </param> /// <returns> /// A message that contains a <seealso cref="List{T}"/> of <seealso cref="Facility"/> that was retrieved /// </returns> public override MessageContracts.FacilitiesMessage GetFacilitiesByAccount(MessageContracts.AccountIdMedicalRequestMessage request) { return new MessageContracts.FacilitiesMessage { Facilities = facilityManager .GetFacilitiesByAccount( request.AccountId, ServiceSecurityContext.Current.PrimaryIdentity) .ToList() }; }
/// <summary> /// Deletes an authorization request through the business logic objects /// </summary> /// <param name="request"> /// The request containing the request to delete /// </param> public override void DeleteAuthorizationRequest(MessageContracts.AuthorizationRequestRequestMessage request) { requestManager.DeleteAuthorizationRequest(request.AuthorizationRequest, ServiceSecurityContext.Current.PrimaryIdentity); }
/// <summary> /// Gets an provider through the business logic objects /// </summary> /// <param name="request"> /// The request containing the provider id of the provider to retrieve /// </param> /// <returns> /// An message containing the requested provider /// </returns> public override MessageContracts.ProviderMessage GetProvider(MessageContracts.ProviderIdRequestMessage request) { return new MessageContracts.ProviderMessage { Provider = providerManager.GetProviderById(request.ProviderId, ServiceSecurityContext.Current.PrimaryIdentity) }; }
/// <summary> /// Retrieves a <seealso cref="List{T}"/> of <seealso cref="AuthorizationRequest"/> /// through the business logic objects for the insurer specified /// </summary> /// <param name="request"> /// The request containing the id of the insurer to retrieve the requests for /// </param> /// <returns> /// A message that contains the <seealso cref="List{T}"/> of <seealso cref="AuthorizationRequest"/> that was retrieved /// </returns> public override MessageContracts.AuthorizationRequestsMessage GetAuthorizationRequestsByInsurer(MessageContracts.InsurerIdRequestMessage request) { return new MessageContracts.AuthorizationRequestsMessage { AuthorizationRequests = requestManager .GetAuthorizationRequestsByInsurer( request.InsurerId, ServiceSecurityContext.Current.PrimaryIdentity) .ToList() }; }
/// <summary> /// Retrieves a <seealso cref="List{T}"/> of <seealso cref="Provider"/> through the business logic objects /// for the facility specified /// </summary> /// <param name="request"> /// The request containing the id of the facility to retrieve the providers for /// </param> /// <returns> /// A message that contains a <seealso cref="List{T}"/> of <seealso cref="Provider"/> that was retrieved /// </returns> public override MessageContracts.ProvidersMessage GetProviderByFacility(MessageContracts.FacilityIdRequestMessage request) { return new MessageContracts.ProvidersMessage { Providers = providerManager .GetProvidersByFacility( request.FacilityId, ServiceSecurityContext.Current.PrimaryIdentity) .ToList() }; }
public void Register(MessageContracts.VehicleRegisterRequestMessage request) { throw new NotImplementedException(); }
/// <summary> /// Gets a medical appointment through the business logic objects /// </summary> /// <param name="request"> /// The request containing the medical appointment id of the appointent to retrieve /// </param> /// <returns> /// An message containing the requested appointment /// </returns> public override MessageContracts.MedicalAppointmentMessage GetMedicalAppointment(MessageContracts.MedicalAppointmentIdRequestMessage request) { return new MessageContracts.MedicalAppointmentMessage { MedicalAppointment = appointmentsManager .GetMedicalAppointmentById(request.MedicalAppointmentId, ServiceSecurityContext.Current.PrimaryIdentity) }; }
/// <summary> /// Retrieves an authorization note through the business logic objects /// </summary> /// <param name="request"> /// The request containing the id of the note to retrieve /// </param> /// <returns> /// A message that contains the <seealso cref="AuthorizationNote"/> that was retrieved /// </returns> public override MessageContracts.AuthorizationNoteMessage GetAuthorizationNote(MessageContracts.AuthorizationNoteIdRequestMessage request) { return new MessageContracts.AuthorizationNoteMessage { AuthorizationNote = noteManager .GetAuthorizationNoteById( request.AuthorizationNoteId, ServiceSecurityContext.Current.PrimaryIdentity) }; }
/// <summary> /// Updates a facility through the business logic objects /// </summary> /// <param name="request"> /// The request containing the facility to update /// </param> public override void UpdateFacility(MessageContracts.FacilityRequestMessage request) { facilityManager.UpdateFacility(request.Facility, ServiceSecurityContext.Current.PrimaryIdentity); }
/// <summary> /// Retrieves a <seealso cref="List{T}"/> of <seealso cref="AuthorizationNote"/> /// through the business logic objects for the authorization request specified /// </summary> /// <param name="request"> /// The request containing the id of the request to retrieve the notes for /// </param> /// <returns> /// A message that contains the <seealso cref="List{T}"/> of <seealso cref="AuthorizationNote"/> that was retrieved /// </returns> public override MessageContracts.AuthorizationNotesMessage GetAuthorizationNotesByAuthorizationRequest(MessageContracts.AuthorizationRequestIdMessage request) { return new MessageContracts.AuthorizationNotesMessage { AuthorizationNotes = noteManager .GetAuthorizationNotesByAuthorizationRequest( request.AuthorizationRequestId, ServiceSecurityContext.Current.PrimaryIdentity) .ToList() }; }
/// <summary> /// Updates an authorization note through the business logic objects /// </summary> /// <param name="request"> /// The request containing the note to update /// </param> public override void UpdateAuthorizationNote(MessageContracts.AuthorizationNoteRequestMessage request) { noteManager.UpdateAuthorizationNote(request.AuthorizationNote, ServiceSecurityContext.Current.PrimaryIdentity); }
public void Confirm(MessageContracts.OrderConfirmationRequestMessage request) { throw new NotImplementedException(); }