public AddNewComputerSteps(BaseContext baseContext) : base(baseContext) { client = new RestClient("http://computer-database.herokuapp.com/"); request = new RestRequest("computers", Method.POST); newComputer = new NewComputer(); }
public override void Execute(Context _context) { // action logic here //if( context.target == null) return; context = (BaseContext) _context; context.alive = false; // Debug.Log("Destroy" + context.gameObject.name); // context.StartCoroutine(WaitAndDestroy() ); GameObject.Destroy(context.gameObject); }
/// <summary> /// 根据用户编码取角色集合 /// </summary> /// <param name="userCode">用户编码</param> /// <returns></returns> private static List<string> GetRoleCodeList(string userCode) { List<string> list = new List<string>(); using (var context = new BaseContext()) { if (!string.IsNullOrEmpty(userCode)) { var user = context.Users.FirstOrDefault(u => u.Code == userCode); if (user != null) { var roleCodes = (from ru in context.RoleUsers join r in context.Roles on ru.RoleID equals r.ID where ru.UserID == user.ID select r.Code ).ToList(); list = roleCodes; } } } return list; }
public override void Execute(Context _context) { // action logic here //if( context.target == null) return; context = (BaseContext) _context; context.alive = false; // Debug.Log("Destroy" + context.gameObject.name); // context.StartCoroutine(WaitAndDestroy() ); if(context.lastHit != null){ pc = context.lastHit.GetComponent<PlayerContext>(); player = GameObject.FindObjectOfType(typeof(PlayerContext)) as PlayerContext; } if(context.team == 1 && pc == null) { // player.streak = 0; } else if(context.team == 1 && pc != null){ player.streak += 1; DisplayBounty(); } GameObject.Destroy(context.gameObject); }
/// <summary> /// This function computes the Base class and also the /// list of interfaces that the class or struct @c implements. /// /// The return value is an array (might be null) of /// interfaces implemented (as Types). /// /// The @base_class argument is set to the base object or null /// if this is `System.Object'. /// </summary> protected virtual TypeSpec[] ResolveBaseTypes (out FullNamedExpression base_class) { base_class = null; if (type_bases == null) return null; int count = type_bases.Count; TypeSpec[] ifaces = null; var base_context = new BaseContext (this); for (int i = 0, j = 0; i < count; i++){ FullNamedExpression fne = type_bases [i]; var fne_resolved = fne.ResolveAsType (base_context); if (fne_resolved == null) continue; if (i == 0 && Kind == MemberKind.Class && !fne_resolved.IsInterface) { if (fne_resolved.BuiltinType == BuiltinTypeSpec.Type.Dynamic) { Report.Error (1965, Location, "Class `{0}' cannot derive from the dynamic type", GetSignatureForError ()); continue; } base_type = fne_resolved; base_class = fne; continue; } if (ifaces == null) ifaces = new TypeSpec [count - i]; if (fne_resolved.IsInterface) { for (int ii = 0; ii < j; ++ii) { if (fne_resolved == ifaces [ii]) { Report.Error (528, Location, "`{0}' is already listed in interface list", fne_resolved.GetSignatureForError ()); break; } } if (Kind == MemberKind.Interface && !IsAccessibleAs (fne_resolved)) { Report.Error (61, fne.Location, "Inconsistent accessibility: base interface `{0}' is less accessible than interface `{1}'", fne_resolved.GetSignatureForError (), GetSignatureForError ()); } } else { Report.SymbolRelatedToPreviousError (fne_resolved); if (Kind != MemberKind.Class) { Report.Error (527, fne.Location, "Type `{0}' in interface list is not an interface", fne_resolved.GetSignatureForError ()); } else if (base_class != null) Report.Error (1721, fne.Location, "`{0}': Classes cannot have multiple base classes (`{1}' and `{2}')", GetSignatureForError (), base_class.GetSignatureForError (), fne_resolved.GetSignatureForError ()); else { Report.Error (1722, fne.Location, "`{0}': Base class `{1}' must be specified as first", GetSignatureForError (), fne_resolved.GetSignatureForError ()); } } ifaces [j++] = fne_resolved; } return ifaces; }
public BranchListRepository(BaseContext dbContext) : base(dbContext) { _dbContext = dbContext; }
public TakeDrugOutItemViewModel(string id_en, Ent4BannerDTO ent4BannerDto, BaseContext Context) : base(ent4BannerDto, Context) { }
public PratoController(BaseContext _db) { this.db = _db; this.repoRest = new RestauranteRepository(db); this.repo = new PratoRepository(db); }
public UnitOfWork(BaseContext baseContext) { _context = baseContext; }
public SubscriptionRepository(BaseContext context) : base(context) { }
public HistoryController(BaseContext baseContext) { context = baseContext; }
private static async Task <TResult> ExecuteMessage <TResult>(BaseContext context, IMessage <TResult> message) { var messageDispatcher = context.HttpContext.RequestServices.GetMessageDispatcher(); return(await messageDispatcher.Execute(message)); }
private static IConfiguration Configuration(BaseContext context) { return(context.HttpContext.RequestServices.GetService(typeof(IConfiguration)) as IConfiguration); }
public OpippathgyCardModel2(BaseContext ctx) : base(ctx) { this.sevice = XapServiceMgr.find <ICirptpathgyCrudService>(); }
private static AuthenticationTicket CreateAuthenticationTicket(ClaimsPrincipal principal, AuthenticationProperties authenticationProperties, OpenIdConnectServerOptions options, BaseContext context) { var configuration = Configuration(context); var ticket = new AuthenticationTicket(principal, authenticationProperties, options.AuthenticationScheme); ticket.SetResources(new[] { configuration.ApiHostName() }); return(ticket); }
public ActionReturnRepository(BaseContext dbContext) : base(dbContext) { _dbContext = dbContext; }
public MemberService(BaseContext context, ILoggerFactory loggerFactory) { _context = context; _logger = loggerFactory.CreateLogger("DataAccessMySqlProvider"); }
public VeiculoController(ILogger <VeiculoController> logger, IRepository repository, BaseContext context) { _logger = logger; _repository = repository; _context = context; }
public WalletRepository(BaseContext ctx) : base(ctx) { }
public HomeController(BaseContext context) { _context = context; }
public VerifyResponseStatus(BaseContext baseContext) { _baseContext = baseContext; }
public ProductCounterPartyRepository(BaseContext dbContext) : base(dbContext) { _dbContext = dbContext; }
public BussCodeInfoRepository(BaseContext dbcontext) : base(dbcontext) { baseContext = dbcontext; }
public UnitOfWork(BaseContext <T> context) { this.context = context; }
public override float GetScore(BaseContext c, BaseEntity target) { return(c.AIAgent.GetWantsToAttack(target)); }
/// <summary> /// ContentorDispositivoController /// </summary> /// <param name="baseContext"></param> /// <param name="jsonApiContext"></param> /// <param name="configuration"></param> public GuiaRecolhimentoController(BaseContext baseContext, IJsonApiContext jsonApiContext, IConfiguration configuration) : base(baseContext, jsonApiContext, configuration) { _guiaRecolhimentoService = new GuiaRecolhimentoService(baseContext, jsonApiContext?.Query); }
public Repository(BaseContext context) { _db = context; _dbSet = context.Set <TEntity>(); }
public override void OnPause(BaseContext nextContext) { base.OnPause(nextContext); SetMusicName(); }
public HomeController(BaseContext context) { _db = context; _tariffs = _db.Tariffs.ToList(); _orders = _db.Orders.ToList(); }
protected virtual bool DoResolveTypeParameters () { if (CurrentTypeParameters == null) return true; if (PartialContainer != this) throw new InternalErrorException (); var base_context = new BaseContext (this); foreach (TypeParameter type_param in CurrentTypeParameters) { if (!type_param.ResolveConstraints (base_context)) { error = true; return false; } } if (partial_parts != null) { foreach (TypeContainer part in partial_parts) UpdateTypeParameterConstraints (part); } return true; }
public UserRepository(BaseContext context) { this.context = context; }
public void SetUp() { TestUtils.InitGEDCOMProviderTest(); fContext = TestUtils.CreateContext(); TestUtils.FillContext(fContext); }
public Lazy <IGenericRepository <File> > GetRepositoryInstance (BaseContext context) { return(new Lazy <IGenericRepository <File> > (() => new FileRepository(context))); }
public void HandleState(object sender, string oldState, string uiEvent, string newState, Dictionary <string, object> data, BaseContext baseContext) { }
protected virtual bool DoResolveTypeParameters () { var tparams = CurrentTypeParameters; if (tparams == null) return true; if (PartialContainer != this) throw new InternalErrorException (); var base_context = new BaseContext (this); for (int i = 0; i < tparams.Count; ++i) { var tp = tparams[i]; if (!tp.ResolveConstraints (base_context)) { error = true; return false; } } if (partial_parts != null) { foreach (TypeContainer part in partial_parts) UpdateTypeParameterConstraints (part); } return true; }
private static HttpContextBase GetHttpContext(BaseContext <OpenIdConnectAuthenticationOptions> n) { return((HttpContextBase)n.OwinContext.Environment["System.Web.HttpContextBase"]); }
protected virtual bool DoResolveTypeParameters () { var tparams = MemberName.TypeParameters; if (tparams == null) return true; var base_context = new BaseContext (this); for (int i = 0; i < tparams.Count; ++i) { var tp = tparams[i]; if (!tp.ResolveConstraints (base_context)) { error = true; return false; } if (IsPartialPart) { var pc_tp = PartialContainer.CurrentTypeParameters [i]; tp.Create (spec, this); tp.Define (pc_tp); if (tp.OptAttributes != null) { if (pc_tp.OptAttributes == null) pc_tp.OptAttributes = tp.OptAttributes; else pc_tp.OptAttributes.Attrs.AddRange (tp.OptAttributes.Attrs); } } } if (IsPartialPart) { PartialContainer.CurrentTypeParameters.UpdateConstraints (this); } return true; }
public ArivalAirportsAdding() { context = new BaseContext(); }
protected virtual bool DoResolveTypeParameters () { var tparams = CurrentTypeParameters; if (tparams == null) return true; var base_context = new BaseContext (this); for (int i = 0; i < tparams.Count; ++i) { var tp = tparams[i]; if (!tp.ResolveConstraints (base_context)) { error = true; return false; } } if (IsPartialPart) { PartialContainer.CurrentTypeParameters.UpdateConstraints (this); } return true; }
/// <summary> /// This function computes the Base class and also the /// list of interfaces that the class or struct @c implements. /// /// The return value is an array (might be null) of /// interfaces implemented (as Types). /// /// The @base_class argument is set to the base object or null /// if this is `System.Object'. /// </summary> protected virtual TypeExpr[] ResolveBaseTypes (out TypeExpr base_class) { base_class = null; if (type_bases == null) return null; int count = type_bases.Count; TypeExpr [] ifaces = null; IMemberContext base_context = new BaseContext (this); for (int i = 0, j = 0; i < count; i++){ FullNamedExpression fne = (FullNamedExpression) type_bases [i]; // // Standard ResolveAsTypeTerminal cannot be used in this case because // it does ObsoleteAttribute and constraint checks which require // base type to be set // TypeExpr fne_resolved = fne.ResolveAsBaseTerminal (base_context, false); if (fne_resolved == null) continue; if (i == 0 && Kind == Kind.Class && !fne_resolved.Type.IsInterface) { if (fne_resolved is DynamicTypeExpr) Report.Error (1965, Location, "Class `{0}' cannot derive from the dynamic type", GetSignatureForError ()); else base_class = fne_resolved; continue; } if (ifaces == null) ifaces = new TypeExpr [count - i]; if (fne_resolved.Type.IsInterface) { for (int ii = 0; ii < j; ++ii) { if (TypeManager.IsEqual (fne_resolved.Type, ifaces [ii].Type)) { Report.Error (528, Location, "`{0}' is already listed in interface list", fne_resolved.GetSignatureForError ()); break; } } if (Kind == Kind.Interface && !IsAccessibleAs (fne_resolved.Type)) { Report.Error (61, fne.Location, "Inconsistent accessibility: base interface `{0}' is less accessible than interface `{1}'", fne_resolved.GetSignatureForError (), GetSignatureForError ()); } } else { Report.SymbolRelatedToPreviousError (fne_resolved.Type); if (Kind != Kind.Class) { Report.Error (527, fne.Location, "Type `{0}' in interface list is not an interface", fne_resolved.GetSignatureForError ()); } else if (base_class != null) Report.Error (1721, fne.Location, "`{0}': Classes cannot have multiple base classes (`{1}' and `{2}')", GetSignatureForError (), base_class.GetSignatureForError (), fne_resolved.GetSignatureForError ()); else { Report.Error (1722, fne.Location, "`{0}': Base class `{1}' must be specified as first", GetSignatureForError (), fne_resolved.GetSignatureForError ()); } } ifaces [j++] = fne_resolved; } return ifaces; }