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