コード例 #1
0
ファイル: PredefinedMembers.cs プロジェクト: medohrir/corefx
        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);
        }
コード例 #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            ACCESS aCCESS = db.ACCESS.Find(id);

            db.ACCESS.Remove(aCCESS);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #3
0
 IntPtr CreateFile(
     string lpFileName,
     ACCESS dwDesiredAccess,
     FILE_SHARE dwShareMode,
     int Res,
     FILE_ACTION dwCreationDispostion,
     FILE_ATTRIBUTE dwFlagsAndAttributes,
     int Res2);
コード例 #4
0
ファイル: AuditTrailFile.cs プロジェクト: windygu/AW-master
        public AuditTrailFile(string filename, ACCESS access)
        {
            _fileName = filename;
            _access   = access;

            // Open the file with the required access
            Open();
        }
コード例 #5
0
 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));
 }
コード例 #6
0
ファイル: PredefinedMembers.cs プロジェクト: medohrir/corefx
        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;
        }
コード例 #7
0
        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);
        }
コード例 #8
0
        //[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));
        }
コード例 #9
0
        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));
        }
コード例 #10
0
ファイル: PredefinedMembers.cs プロジェクト: medohrir/corefx
 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);
 }
コード例 #11
0
ファイル: Symbol.cs プロジェクト: Rayislandstyle/corefx
 public void SetAccess(ACCESS access)
 {
     _access = access;
 }
コード例 #12
0
 public static extern IntPtr CeCreateFile(string lpFileName, ACCESS dwDesiredAccess, SHARE dwShareMode, int Res1, ACTION dwCreationDisposition, FILEFLAGATT dwFlagsAndAttributes, int Res2);
コード例 #13
0
 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;
 }
コード例 #14
0
        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;
        }
コード例 #15
0
 public void SetAccess(ACCESS access)
 {
     this.access = access;
 }
コード例 #16
0
ファイル: 50.VSystem.cs プロジェクト: BclEx/GpuData
 public abstract RC Access(string path, ACCESS flags, out int outRC);
コード例 #17
0
ファイル: MainFunc.cs プロジェクト: yanuarizalk/asp_reports
 public bool CheckAccess(ACCESS idMenu = 0)
 {
     return(CheckAccess((int)idMenu));
 }
コード例 #18
0
 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;
 }
コード例 #19
0
ファイル: VSystem.cs プロジェクト: BclEx/GpuEx
 public abstract RC Access(string path, ACCESS flags, out int outRC);
コード例 #20
0
        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;
        }
コード例 #21
0
ファイル: Feild.cs プロジェクト: illyohs/mutatio
 public FeildAccessTransformer(string location, string name, ACCESS oldAccess, ACCESS newAcceess) : base(location, name)
 {
     _old = oldAccess;
     _new = newAcceess;
 }
コード例 #22
0
ファイル: Symbol.cs プロジェクト: shandan1/CollectionRef
 public void SetAccess(ACCESS access)
 {
     _access = access;
 }
コード例 #23
0
ファイル: ADVAPI32.cs プロジェクト: CaveSystems/cave-windows
 internal static extern bool DuplicateTokenEx(IntPtr hExistingToken, ACCESS dwDesiredAccess, ref SECURITY_ATTRIBUTES lpThreadAttributes, SECURITY_IMPERSONATION_LEVEL impersonationLevel, TOKEN_TYPE dwTokenType, out IntPtr phNewToken);