This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.0; | |
/* | |
* @dev Provides information about the current execution context, including the | |
* sender of the transaction and its data. While these are generally available | |
* via msg.sender and msg.data, they should not be accessed in such a direct | |
* manner, since when dealing with GSN meta-transactions the account sending and | |
* paying for execution may not be the actual sender (as far as an application | |
* is concerned). | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyController : ControllerBase | |
{ | |
private readonly Func<int, IService> _serviceFactory; | |
public MyController(Func<int, IService> serviceFactory) | |
{ | |
_serviceFactory = serviceFactory; | |
} | |
public ActionResult<string> GetSomething() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am bmeredith on github. | |
* I am bmeredith (https://keybase.io/bmeredith) on keybase. | |
* I have a public key ASA6LjRdfTa14oEMqKF-PNN5E0ri3_H1lWqan9TFRPakkQo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// uses the nuget package: | |
// https://www.nuget.org/packages/System.Linq.Dynamic.Core/ | |
// | |
// the real magic comes from here: | |
// https://github.com/StefH/System.Linq.Dynamic.Core/blob/master/src/System.Linq.Dynamic.Core/DynamicClassFactory.cs | |
public class DynamicSqlObjectFactory | |
{ | |
// this will return a DynamicClass object which can be manipulated using straight reflection | |
// or using any of System.Dynamic.DynamicObject's methods as well | |
public DynamicClass Create(IDictionary<string, object> item, IEnumerable<DatabaseColumn> fields) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
04e735c1e62eab4f988ad80c6a541f20b2c1fd4f6c54fa2a6e4f7de679774cfb7725e9a1f89e50e521adb600e7aa09c81e0b744ca2f438ac4f156b5925c3b62f93 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AutofacCommandDispatcher : ICommandDispatcher | |
{ | |
private readonly IComponentContext _context; | |
public AutofacCommandDispatcher(IComponentContext context) | |
{ | |
_context = context; | |
} | |
public void Dispatch(ICommand command) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.validator.prototype.checkForm = function () { | |
this.prepareForm(); | |
for (var i = 0, elements = (this.currentElements = this.elements()) ; elements[i]; i++) { | |
if (this.findByName(elements[i].name).length != undefined && this.findByName(elements[i].name).length > 1) { | |
for (var cnt = 0; cnt < this.findByName(elements[i].name).length; cnt++) { | |
this.check(this.findByName(elements[i].name)[cnt]); | |
} | |
} else { | |
this.check(elements[i]); |