Skip to content

Commit

Permalink
Merge pull request #40 from PrecisionCoding/develop
Browse files Browse the repository at this point in the history
Minor updates mostly
  • Loading branch information
mattbrailsford authored Apr 10, 2018
2 parents 6db3541 + 1c055da commit 8f9890d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/_pages/02-api-10-repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class PersonRepository : FluidityRepository<Person, int> {
...
}

protected override PagedResult<Person> GetPagedImpl(int pageNumber, int pageSize, Expression<Func<Person, bool>> whereClause, Expression<Func<Person, object>> orderBy, SortDirection orderDirection);
protected override PagedResult<Person> GetPagedImpl(int pageNumber, int pageSize, Expression<Func<Person, bool>> whereClause, Expression<Func<Person, object>> orderBy, SortDirection orderDirection) {
...
}

Expand Down Expand Up @@ -55,7 +55,7 @@ A repository is assigned to a collection as part of the collection configuration
### Accessing a repository in code
{: .mt}

If you have created your own repository implementation, then accessing the repository can be as simple as instanttiating a new instance of the repository class, however if you are using the built in repository, unfortunately a new instance can't be created in this way.
If you have created your own repository implementation, then accessing the repository can be as simple as instantiating a new instance of the repository class, however if you are using the built in repository, unfortunately a new instance can't be created in this way.

To help with accessing a repository (default or custom) Fluidity has a couple of factory methods to create the repository instances for you.

Expand Down
2 changes: 1 addition & 1 deletion docs/_pages/03-property-editors-00-entity-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ foreach(var p in Model.Content.People.Cast<Person>()){
}
````

**Note:** Due to the fact that the property editor can link to any entity type, the returned value type from the value converter will be `IEnumrable<object>` and so will require the entities to be cast to the desired concrete type.
**Note:** Due to the fact that the property editor can link to any entity type, the returned value type from the value converter will be `IEnumerable<object>` and so will require the entities to be cast to the desired concrete type.
8 changes: 4 additions & 4 deletions src/Fluidity/Configuration/FluidityEditorFieldConfig`T.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,22 +160,22 @@ public FluidityEditorFieldConfig<TEntityType, TValueType> SetDefaultValue(Func<T
/// Makes the the field readonly, disabling editing in the UI.
/// </summary>
/// <returns>The editor field configuration.</returns>
public FluidityEditorFieldConfig<TEntityType, TValueType> MakeReadonly()
public FluidityEditorFieldConfig<TEntityType, TValueType> MakeReadOnly()
{
//TODO: Create defaults for different primitives
return MakeReadonly(type => type?.ToString());
return MakeReadOnly(type => type?.ToString());
}

/// <summary>
/// Makes the the field readonly, disabling editing in the UI.
/// </summary>
/// <param name="format">A format function.</param>
/// <returns>The editor field configuration.</returns>
public FluidityEditorFieldConfig<TEntityType, TValueType> MakeReadonly(Func<TValueType, string> format) {
public FluidityEditorFieldConfig<TEntityType, TValueType> MakeReadOnly(Func<TValueType, string> format) {
_valueMapper = new ReadOnlyValueMapper(value => format((TValueType)value));
_dataTypeId = -92;
_isReadOnly = true;
return this;
}
}
}
}

0 comments on commit 8f9890d

Please sign in to comment.