10 instantiations of Contact
BasicWebSite (6)
Controllers\ContactApiController.cs (3)
58return new Contact 88=> repository.GetContact(id) ?? new Contact() { ContactId = id }; 137=> Results.Ok(new Contact() { ContactId = id });
Controllers\ContentNegotiation\ProducesWithMediaTypeParametersController.cs (2)
27return new Contact() 37return new Contact()
Controllers\ContentNegotiation\ProducesWithMediaTypeSuffixesController.cs (1)
15return new Contact()
Microsoft.AspNetCore.Mvc.FunctionalTests (4)
ApiBehaviorTest.cs (4)
48var contactModel = new Contact 146var input = new Contact 166var input = new Contact 433var contactModel = new Contact
49 references to Contact
BasicWebSite (28)
ContactsRepository.cs (4)
10private readonly List<Contact> _contacts = new List<Contact>(); 12public Contact GetContact(int id) 17public void Add(Contact contact)
Controllers\ContactApiController.cs (14)
22public ActionResult<Contact> Get(int id) 24var contact = _repository.GetContact(id); 34public ActionResult<Contact> Post([FromBody] Contact contact) 42public ActionResult<Contact> PostWithVnd([FromBody] Contact contact) 49public ActionResult<Contact> ActionWithInferredFromBodyParameter(Contact contact) => contact; 52public ActionResult<Contact> ActionWithInferredFromBodyParameterAndCancellationToken(Contact contact, CancellationToken cts) 56public ActionResult<Contact> ActionWithInferredRouteAndQueryParameter(int id, string name, string email) 67public ActionResult<Contact> ActionWithInferredEmptyPrefix([FromQuery] Contact contact) 87public ActionResult<Contact> ActionWithInferredFromServicesParameter(int id, ContactsRepository repository)
Controllers\ContentNegotiation\ProducesWithMediaTypeParametersController.cs (2)
25public Contact ContactInfoUsingV3Format() 35public Contact ContactInfoUsingV4Format()
Controllers\ContentNegotiation\ProducesWithMediaTypeSuffixesController.cs (1)
13public Contact ContactInfo()
Formatters\VCardFormatter_V3.cs (3)
26return typeof(Contact).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo()); 31var contact = (Contact)context.Object;
Formatters\VCardFormatter_V4.cs (3)
27return typeof(Contact).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo()); 32var contact = (Contact)context.Object;
Models\Contact.cs (1)
40public Contact ContactInfo { get; set; }
Microsoft.AspNetCore.Mvc.FunctionalTests (21)
ApiBehaviorTest.cs (14)
48var contactModel = new Contact 146var input = new Contact 157var result = JsonConvert.DeserializeObject<Contact>(await response.Content.ReadAsStringAsync()); 166var input = new Contact 194var result = JsonConvert.DeserializeObject<Contact>(await response.Content.ReadAsStringAsync()); 211var result = JsonConvert.DeserializeObject<Contact>(await response.Content.ReadAsStringAsync()); 232var result = await response.Content.ReadAsAsync<Contact>(); 253var result = await response.Content.ReadAsAsync<Contact>(); 433var contactModel = new Contact
ContentNegotiationTest.cs (5)
498var contact = JsonConvert.DeserializeObject<Contact>(body); 516var xmlDeserializer = new DataContractSerializer(typeof(Contact)); 517var contact = xmlDeserializer.ReadObject(bodyStream) as Contact;
HttpActionResultTests.cs (2)
42var result = await response.Content.ReadFromJsonAsync<Contact>();