public static SelectList TechList(int status, guid role)
 {
     using (var db = new DbContext())
     {
         return(new SelectList(db.Users.Where(u => u.Status == status & u.RoleID == role).OrderBy(u => u.FullName).ToList(), "UserId", "FullName"));
     }
 }
Exemple #2
0
        static void CreatUser()
        {
            var  user = new User();
            Guid guid = new Guid();

            Id = guid;
        }
Exemple #3
0
        unsafe static thumbnail()
        {
            (qualityEncoder = new EncoderParameters(1)).Param[0] = new EncoderParameter(Encoder.Quality, 100L);
            ImageCodecInfo[] infos = ImageCodecInfo.GetImageDecoders();
            imageCodecs = new fastCSharp.stateSearcher.byteArray <ImageCodecInfo>(infos.getArray(value => fastCSharp.guid.ToByteArray(value.FormatID)), infos, true);
            guid guid = new guid {
                Value = ImageFormat.Jpeg.Guid
            };

            jpegImageCodecInfo = imageCodecs.Get(&guid, 16);
        }
Exemple #4
0
 private unsafe static ImageCodecInfo getImageCodec(ImageFormat format)
 {
     if (format != null)
     {
         guid guid = new guid {
             Value = format.Guid
         };
         return(imageCodecs.Get(&guid, 16));
     }
     return(null);
 }
Exemple #5
0
        private static void Test_WriteT()
        {
            // read in all the points from A, and write out to a temp file that looks like B

            ReaderFactory factory = new ReaderFactory();

            SWIGTYPE_p_std__istream ifs = Liblas.ReaderFactory.FileOpen(fileB);
            SWIGTYPE_p_std__ostream ofs = Liblas.WriterFactory.FileCreate(fileT);

            using (Reader reader = factory.CreateWithStream(ifs))
            {
                Header rHeader = reader.GetHeader();

                {
                    Header wHeader = new Header(rHeader);
                    {
                        wHeader.SetSystemId("liblas test");
                        wHeader.SetSoftwareId("swig test");
                        wHeader.SetCompressed(true);
                        guid g = new guid("D59B08E7-79EE-47E4-AAE1-2B8DE4B87331");
                        wHeader.SetProjectId(g);
                        wHeader.SetCreationYear(2011);
                        wHeader.SetCreationDOY(12);
                    }
                    {
                        using (Writer writer = new Writer(ofs, wHeader))
                        {
                            while (reader.ReadNextPoint())
                            {
                                Point pt = reader.GetPoint();
                                bool  ok = writer.WritePoint(pt);
                                Debug.Assert(ok);
                            }
                        }
                    }
                }
            }
            Liblas.WriterFactory.FileClose(ofs);
            Liblas.ReaderFactory.FileClose(ifs);
        }
Exemple #6
0
        static public void Test_T(guid guid)
        {
            string s = guid.to_string();

            Debug.Assert(s == "D59B08E7-79EE-47E4-AAE1-2B8DE4B87331".ToLower());
        }
Exemple #7
0
 static public void Test_B(guid g)
 {
     Test(g);
 }
Exemple #8
0
        static private void Test(guid g)
        {
            string s = g.to_string();

            Debug.Assert(s == "00000000-0000-0000-0000-000000000000");
        }
Exemple #9
0
 2 => Create2PlayersImages(guid, initialImage, imageFilters),
 3 => Create3PlayersImages(guid, initialImage, imageFilters),
 public ShoppingCartItem(guid key, decimal price, int quantity)
 {
     this.Key      = key;
     this.Price    = price;
     this.Quantity = quantity;
 }
Exemple #11
0
      private static void Test_WriteT()
      {
         // read in all the points from A, and write out to a temp file that looks like B

         ReaderFactory factory = new ReaderFactory();

         SWIGTYPE_p_std__istream ifs = Liblas.ReaderFactory.FileOpen(fileB);
         SWIGTYPE_p_std__ostream ofs = Liblas.WriterFactory.FileCreate(fileT);

         using (Reader reader = factory.CreateWithStream(ifs))
         {
            Header rHeader = reader.GetHeader();

            {
               Header wHeader = new Header(rHeader);
               {
                  wHeader.SetSystemId("liblas test");
                  wHeader.SetSoftwareId("swig test");
                  wHeader.SetCompressed(true);
                  guid g = new guid("D59B08E7-79EE-47E4-AAE1-2B8DE4B87331");
                  wHeader.SetProjectId(g);
                  wHeader.SetCreationYear(2011);
                  wHeader.SetCreationDOY(12);
               }
               {
                  using (Writer writer = new Writer(ofs, wHeader))
                  {
                     while (reader.ReadNextPoint())
                     {
                        Point pt = reader.GetPoint();
                        bool ok = writer.WritePoint(pt);
                        Debug.Assert(ok);
                     }
                  }
               }
            }
         }
         Liblas.WriterFactory.FileClose(ofs);
         Liblas.ReaderFactory.FileClose(ifs);
      }
Exemple #12
0
 static public void Test_T(guid guid)
 {
    string s = guid.to_string();
    Debug.Assert(s == "D59B08E7-79EE-47E4-AAE1-2B8DE4B87331".ToLower());
 }
Exemple #13
0
 static public void Test_B(guid g)
 {
    Test(g);
 }
Exemple #14
0
 static private void Test(guid g)
 {
    string s = g.to_string();
    Debug.Assert(s == "00000000-0000-0000-0000-000000000000");
 }
Exemple #15
0
 var(guid, name) = data;
 key         = new ArtifactKey(guid, indexerType);
Exemple #17
0
 return(_tryFormatShim(guid, destination, out charsWritten, format));
Exemple #18
0
 4 => Create4PlayersImages(guid, initialImage, imageFilters),
Exemple #19
0
 TryGetGUIDAndLocalID(context, out var guid, out var localID) ? GenerateFileName(guid, localID, fieldName) : null;