private MethodSymbol LoadMethod( AggregateSymbol type, int[] signature, int cMethodTyVars, Name methodName, ACCESS methodAccess, bool isStatic, bool isVirtual ) { Debug.Assert(signature != null); Debug.Assert(cMethodTyVars >= 0); Debug.Assert(methodName != null); Debug.Assert(type != null); TypeArray classTyVars = type.GetTypeVarsAll(); int index = 0; CType returnType = LoadTypeFromSignature(signature, ref index, classTyVars); Debug.Assert(returnType != null); TypeArray argumentTypes = LoadTypeArrayFromSignature(signature, ref index, classTyVars); Debug.Assert(argumentTypes != null); MethodSymbol ret = LookupMethodWhileLoading(type, cMethodTyVars, methodName, methodAccess, isStatic, isVirtual, returnType, argumentTypes); if (ret == null) { RuntimeBinderSymbolTable.AddPredefinedMethodToSymbolTable(type, methodName); ret = LookupMethodWhileLoading(type, cMethodTyVars, methodName, methodAccess, isStatic, isVirtual, returnType, argumentTypes); } return(ret); }
public ActionResult DeleteConfirmed(int id) { ACCESS aCCESS = db.ACCESS.Find(id); db.ACCESS.Remove(aCCESS); db.SaveChanges(); return(RedirectToAction("Index")); }
IntPtr CreateFile( string lpFileName, ACCESS dwDesiredAccess, FILE_SHARE dwShareMode, int Res, FILE_ACTION dwCreationDispostion, FILE_ATTRIBUTE dwFlagsAndAttributes, int Res2);
public AuditTrailFile(string filename, ACCESS access) { _fileName = filename; _access = access; // Open the file with the required access Open(); }
public ActionResult Edit([Bind(Include = "IdLogin,Email,UserLog,Password,Active,Profile,Name,LastName,UserLogin")] ACCESS aCCESS) { if (ModelState.IsValid) { db.Entry(aCCESS).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aCCESS)); }
public int[] signature; // Size 8. expand this if a new method has a signature which doesn't fit in the current space public PredefinedMethodInfo(PREDEFMETH method, PredefinedType type, PredefinedName name, MethodCallingConventionEnum callingConvention, ACCESS access, int cTypeVars, int[] signature) { this.method = method; this.type = type; this.name = name; this.callingConvention = callingConvention; this.access = access; this.cTypeVars = cTypeVars; this.signature = signature; }
public ACCESS AccessToEntity(Access item) { ACCESS newAccess = new ACCESS() { IdAccess = item.IdAccess, //STATION= StationToEntity(item.CodStation), //USER = UserToEntity(item.CodUser), DateEntry = item.DateEntry, DateExit = item.DateExit }; return(newAccess); }
//[HttpPost] //[ValidateAntiForgeryToken] //public ActionResult Create([Bind(Include = "IdLogin,Email,UserLog,Password,Active,Profile,Name,LastName")] ACCESS aCCESS) //{ // if (ModelState.IsValid) // { // db.ACCESS.Add(aCCESS); // db.SaveChanges(); // return RedirectToAction("Index"); // } // return View(aCCESS); //} // GET: ACCESS/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ACCESS aCCESS = db.ACCESS.Find(id); if (aCCESS == null) { return(HttpNotFound()); } return(View(aCCESS)); }
public ActionResult Create([Bind(Include = "IdLogin,Email,UserLog,Password,Active,Profile,Name,LastName,UserLogin")] ACCESS aCCESS) { if (ModelState.IsValid) { using (atripservicesEntities db = new atripservicesEntities()) { var vLogin = db.ACCESS.Where(p => p.Email.Equals(aCCESS.Email)).FirstOrDefault(); if (vLogin != null) { ModelState.AddModelError("", "Already registered user!!! Please, use other email."); return(View(new ACCESS())); } else { db.ACCESS.Add(aCCESS); db.SaveChanges(); return(RedirectToAction("Index")); } } } return(View(aCCESS)); }
private MethodSymbol LookupMethodWhileLoading(AggregateSymbol type, int cMethodTyVars, Name methodName, ACCESS methodAccess, bool isStatic, bool isVirtual, CType returnType, TypeArray argumentTypes) { for (Symbol sym = GetSymbolLoader().LookupAggMember(methodName, type, symbmask_t.MASK_ALL); sym != null; sym = SymbolLoader.LookupNextSym(sym, type, symbmask_t.MASK_ALL)) { if (sym is MethodSymbol methsym) { if ((methsym.GetAccess() == methodAccess || methodAccess == ACCESS.ACC_UNKNOWN) && methsym.isStatic == isStatic && methsym.isVirtual == isVirtual && methsym.typeVars.Count == cMethodTyVars && GetTypeManager().SubstEqualTypes(methsym.RetType, returnType, null, methsym.typeVars, SubstTypeFlags.DenormMeth) && GetTypeManager().SubstEqualTypeArrays(methsym.Params, argumentTypes, (TypeArray)null, methsym.typeVars, SubstTypeFlags.DenormMeth)) { return(methsym); } } } return(null); }
public void SetAccess(ACCESS access) { _access = access; }
public static extern IntPtr CeCreateFile(string lpFileName, ACCESS dwDesiredAccess, SHARE dwShareMode, int Res1, ACTION dwCreationDisposition, FILEFLAGATT dwFlagsAndAttributes, int Res2);
private MethodSymbol LookupMethodWhileLoading(AggregateSymbol type, int cMethodTyVars, Name methodName, ACCESS methodAccess, bool isStatic, bool isVirtual, CType returnType, TypeArray argumentTypes) { for (Symbol sym = GetSymbolLoader().LookupAggMember(methodName, type, symbmask_t.MASK_ALL); sym != null; sym = GetSymbolLoader().LookupNextSym(sym, type, symbmask_t.MASK_ALL)) { if (sym.IsMethodSymbol()) { MethodSymbol methsym = sym.AsMethodSymbol(); if ((methsym.GetAccess() == methodAccess || methodAccess == ACCESS.ACC_UNKNOWN) && methsym.isStatic == isStatic && methsym.isVirtual == isVirtual && methsym.typeVars.size == cMethodTyVars && GetTypeManager().SubstEqualTypes(methsym.RetType, returnType, null, methsym.typeVars, SubstTypeFlags.DenormMeth) && GetTypeManager().SubstEqualTypeArrays(methsym.Params, argumentTypes, (TypeArray)null, methsym.typeVars, SubstTypeFlags.DenormMeth) && !methsym.getBogus()) { return methsym; } } } return null; }
public int[] signature; // Size 8. expand this if a new method has a signature which doesn't fit in the current space public PredefinedMethodInfo(PREDEFMETH method, MethodRequiredEnum required, PredefinedType type, PredefinedName name, MethodCallingConventionEnum callingConvention, ACCESS access, int cTypeVars, int[] signature) { this.method = method; this.type = type; this.name = name; this.callingConvention = callingConvention; this.access = access; this.cTypeVars = cTypeVars; this.signature = signature; }
public void SetAccess(ACCESS access) { this.access = access; }
public abstract RC Access(string path, ACCESS flags, out int outRC);
public bool CheckAccess(ACCESS idMenu = 0) { return(CheckAccess((int)idMenu)); }
public RC xAccess(string zName, ACCESS flags, out int pResOut) { var rc = RC.OK; // Do a quick test to prevent the try/catch block if (flags == ACCESS.EXISTS) { #if WINDOWS_PHONE pResOut = (System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication().FileExists(zFilename) ? 1 : 0); #elif SQLITE_SILVERLIGHT pResOut = (IsolatedStorageFile.GetUserStoreForApplication().FileExists(zFilename) ? 1 : 0); #else pResOut = (File.Exists(zName) ? 1 : 0); #endif return RC.OK; } FileAttributes attr = 0; try { #if WINDOWS_PHONE || WINDOWS_MOBILE || SQLITE_SILVERLIGHT if (new DirectoryInfo(zFilename).Exists) #else attr = File.GetAttributes(zName); if (attr == FileAttributes.Directory) #endif try { var name = Path.Combine(Path.GetTempPath(), Path.GetTempFileName()); var fs = File.Create(name); fs.Close(); File.Delete(name); attr = FileAttributes.Normal; } catch (IOException) { attr = FileAttributes.ReadOnly; } } // isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. Since the ASCII version of these Windows API do not exist for WINCE, // it's important to not reference them for WINCE builds. catch (IOException) { VirtualFile.winLogError(RC.IOERR_ACCESS, "winAccess", zName); } switch (flags) { case ACCESS.READ: case ACCESS.EXISTS: rc = (attr != 0 ? RC.ERROR : RC.OK); break; case ACCESS.READWRITE: rc = (attr == 0 ? RC.OK : (attr & FileAttributes.ReadOnly) != 0 ? RC.OK : RC.ERROR); break; default: Debug.Assert("" == "Invalid flags argument"); rc = RC.OK; break; } pResOut = (int)rc; return RC.OK; }
private MethodSymbol LoadMethod( AggregateSymbol type, int[] signature, int cMethodTyVars, Name methodName, ACCESS methodAccess, bool isStatic, bool isVirtual ) { Debug.Assert(signature != null); Debug.Assert(cMethodTyVars >= 0); Debug.Assert(methodName != null); if (type == null) { return null; } TypeArray classTyVars = type.GetTypeVarsAll(); int index = 0; CType returnType = LoadTypeFromSignature(signature, ref index, classTyVars); if (returnType == null) { return null; } TypeArray argumentTypes = LoadTypeArrayFromSignature(signature, ref index, classTyVars); if (argumentTypes == null) { return null; } TypeArray standardMethodTyVars = GetTypeManager().GetStdMethTyVarArray(cMethodTyVars); MethodSymbol ret = LookupMethodWhileLoading(type, cMethodTyVars, methodName, methodAccess, isStatic, isVirtual, returnType, argumentTypes); if (ret == null) { RuntimeBinderSymbolTable.AddPredefinedMethodToSymbolTable(type, methodName); ret = LookupMethodWhileLoading(type, cMethodTyVars, methodName, methodAccess, isStatic, isVirtual, returnType, argumentTypes); } return ret; }
public FeildAccessTransformer(string location, string name, ACCESS oldAccess, ACCESS newAcceess) : base(location, name) { _old = oldAccess; _new = newAcceess; }
internal static extern bool DuplicateTokenEx(IntPtr hExistingToken, ACCESS dwDesiredAccess, ref SECURITY_ATTRIBUTES lpThreadAttributes, SECURITY_IMPERSONATION_LEVEL impersonationLevel, TOKEN_TYPE dwTokenType, out IntPtr phNewToken);