Skip to content

Commit

Permalink
Remove one more VS2015 feature usage
Browse files Browse the repository at this point in the history
  • Loading branch information
chinadragon0515 committed Aug 9, 2016
1 parent 23fd32e commit 36da89f
Showing 1 changed file with 33 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ public IQueryable<Person> People
get
{
var datasource = _dataStoreManager.GetDataStoreInstance(Key);
return datasource?.People.AsQueryable();
if (datasource != null)
{
return datasource.People.AsQueryable();
}

return null;
}
}

Expand All @@ -57,7 +62,12 @@ public IQueryable<Person> NewComePeople
get
{
var datasource = _dataStoreManager.GetDataStoreInstance(Key);
return datasource?.People.AsQueryable();
if (datasource != null)
{
return datasource.People.AsQueryable();
}

return null;
}
}

Expand All @@ -66,7 +76,12 @@ public Person Me
get
{
var datasource = _dataStoreManager.GetDataStoreInstance(Key);
return datasource?.Me;
if (datasource != null)
{
return datasource.Me;
}

return null;
}
}

Expand All @@ -75,7 +90,12 @@ public IQueryable<Airline> Airlines
get
{
var datasource = _dataStoreManager.GetDataStoreInstance(Key);
return datasource?.Airlines.AsQueryable();
if (datasource != null)
{
return datasource.Airlines.AsQueryable();
}

return null;
}
}

Expand All @@ -84,7 +104,12 @@ public IQueryable<Airport> Airports
get
{
var datasource = _dataStoreManager.GetDataStoreInstance(Key);
return datasource?.Airports.AsQueryable();
if (datasource != null)
{
return datasource.Airports.AsQueryable();
}

return null;
}
}

Expand Down Expand Up @@ -349,7 +374,7 @@ public Task<SubmitResult> ExecuteSubmitAsync(SubmitContext context, Cancellation
/// </summary>
private class CustomerizedChangeSetInitializer : IChangeSetInitializer
{
public async Task InitializeAsync(SubmitContext context, CancellationToken cancellationToken)
public Task InitializeAsync(SubmitContext context, CancellationToken cancellationToken)
{
var key = LibraryUtils.GetSessionId();
var dataSource = _dataStoreManager.GetDataStoreInstance(key);
Expand Down Expand Up @@ -417,6 +442,8 @@ public async Task InitializeAsync(SubmitContext context, CancellationToken cance
}
}
}

return Task.WhenAll();
}

private static void SetValues(object instance, Type type, IReadOnlyDictionary<string, object> values)
Expand Down

0 comments on commit 36da89f

Please sign in to comment.