I hereby claim:
- I am badabum on github.
- I am ikorotenko (https://keybase.io/ikorotenko) on keybase.
- I have a public key ASDuEPpUaRCqSPPqswGJRUxL1EfIiQk0fO7cyJCU2M9WQAo
To claim this, I am signing this object:
public static class JsonPatchDocumentExtensions | |
{ | |
public static Result Apply<TModel>(this JsonPatchDocument<TModel> jsonPatchDocument, TModel model) where TModel : class | |
{ | |
Result applyingResult = Result.Ok(); | |
void InCaseOfError(JsonPatchError jsonPatchError) => applyingResult = Result.Failure(jsonPatchError.ErrorMessage); | |
jsonPatchDocument.ApplyTo(model, InCaseOfError); | |
return applyingResult; | |
} | |
public static Result<TModel, AppError> ApplyOps<TModel>(this JsonPatchDocument<TModel> jsonPatchDocument, TModel model) where TModel : class |
I hereby claim:
To claim this, I am signing this object:
function Join-Objects($source, $extend){ | |
if($source.GetType().Name -eq "PSCustomObject" -and $extend.GetType().Name -eq "PSCustomObject"){ | |
foreach($Property in $source | Get-Member -type NoteProperty, Property){ | |
if($extend.$($Property.Name) -eq $null){ | |
continue; | |
} | |
$source.$($Property.Name) = Join-Objects $source.$($Property.Name) $extend.$($Property.Name) | |
} | |
}else{ | |
$source = $extend; |