当前位置: 首页>>代码示例>>C#>>正文


C# SessionBase类代码示例

本文整理汇总了C#中SessionBase的典型用法代码示例。如果您正苦于以下问题:C# SessionBase类的具体用法?C# SessionBase怎么用?C# SessionBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SessionBase类属于命名空间,在下文中一共展示了SessionBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ObjectViewModel

 public ObjectViewModel(object obj, FieldViewModel parentView, int arrayIndex, bool encodedOid, SessionBase session)
   : base(parentView, true)
 {
   m_session = session;
   if (encodedOid)
   {
     if (obj.GetType() == typeof(UInt64))
     {
       m_objectId = (UInt64)obj;
       m_objectAsString = "[" + arrayIndex.ToString() + "] " + new Oid(m_objectId).ToString();
     }
     else
     {
       Oid oid = new Oid(parentView.ParentId);
       oid = new Oid(oid.Database, (UInt32)obj);
       m_objectId = oid.Id;
       m_objectAsString = "[" + arrayIndex.ToString() + "] " + new OidShort(oid.IdShort).ToString();
     }
   }
   else
   {
     IOptimizedPersistable pObj = obj as IOptimizedPersistable;
     if (pObj == null)
       session.GlobalObjWrapperGet(obj, out pObj);
     if (pObj != null)
       m_objectId = pObj.Id;
     m_session = session;
     if (pObj != null && pObj.WrappedObject != obj)
       m_objectAsString = "[" + arrayIndex.ToString() + "] " + pObj.WrappedObject.ToString() + " " + new Oid(pObj.Id);
     else
       m_objectAsString = "[" + arrayIndex.ToString() + "] " + obj.ToString();
   }
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:33,代码来源:ObjectViewModel.cs

示例2: CustomerContact

 public CustomerContact(string company, string firstName, string lastName, string email, string address,
                        string addressLine2, string city, string zipCode, string state, string country, string countryCode, string phone, string fax,
                        string mobile, string skypeName, string webSite, string userName, string password, string howFoundOther, int howFoundChoice,
                        SessionBase session)
 {
   this.company = company;
   this.firstName = firstName;
   this.lastName = lastName;
   this.email = email;
   this.address = address;
   this.addressLine2 = addressLine2;
   this.city = city;
   this.zipCode = zipCode;
   this.state = state;
   this.country = country;
   this.countryCode = countryCode;
   this.phone = phone;
   this.fax = fax;
   this.mobile = mobile;
   this.skypeName = skypeName;
   this.webSite = webSite;
   this.userName = userName;
   this.password = password;
   this.howFoundOther = howFoundOther;
   this.howFoundVelocityDb = (HowFound) howFoundChoice;
   priorVerifiedEmailSet = new SortedSetAny<string>();
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:27,代码来源:CustomerContact.cs

示例3: ImdbRoot

 public ImdbRoot(SessionBase session)
 {   
   actorSet = new BTreeSet<Actor>(null, session);
   actressSet = new BTreeSet<Actress>(null, session);
   actingByNameSet = new BTreeSet<ActingPerson>(actingByNameComparer, session);
   movieSet = new BTreeSet<Movie>(movieNameHashComparer, session, 10000, sizeof(Int32));
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:7,代码来源:ImdbRoot.cs

示例4: FederationViewModel

 public FederationViewModel(IList<Database> databases, SessionBase session)
 {
   _databases = new ReadOnlyCollection<DatabaseViewModel>(
     (from database in databases
      select new DatabaseViewModel(database, session))
      .ToList());
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:7,代码来源:FederationViewModel.cs

示例5: PageViewModel

 public PageViewModel(Page page, DatabaseViewModel parentDatabase, SessionBase session)
   : base(parentDatabase, true)
 {
   m_dbNum = page.Database.DatabaseNumber;
   m_pageNum = page.PageNumber;
   m_session = session;
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:7,代码来源:PageViewModel.cs

示例6: Plug

        public void Plug(IOThread ioThread, SessionBase session)
        {
            m_session = session;
            m_encoder.SetMsgSource(session);

            // get the first message from the session because we don't want to send identities
            var msg = new Msg();
            msg.InitEmpty();

            bool ok = session.PullMsg(ref msg);

            if (ok)
            {
                msg.Close();
            }

            AddSocket(m_socket);            

            if (!m_delayedStart)
            {
                StartConnecting();
            }
            else
            {
                m_state = State.Delaying;                
                AddTimer(GetNewReconnectIvl(), ReconnectTimerId);
            }
        }
开发者ID:NetMQ,项目名称:NetMQ3-x,代码行数:28,代码来源:PgmSender.cs

示例7: processsMovies

 void processsMovies(SessionBase session)
 {
   UInt32 actorDbNum = session.DatabaseNumberOf(typeof(Actor));
   foreach (Movie movie in unchasedMovie)
   {
     if (chasedMovie.Contains(movie.ShortId) == false)
     {
       chasedMovie.Add(movie.ShortId);
       foreach (ActingPerson acting in movie.Cast)
       {
         if (acting.DatabaseNumber == actorDbNum)
         {
           if (chasedActor.Contains(acting.ShortId) == false)
           {
             unchasedPerson.Add(acting);
             chasedActor.Add(acting.ShortId);
             resultArray[bacon]++;
           }
         }
         else
           if (chasedActress.Contains(acting.ShortId) == false)
           {
             unchasedPerson.Add(acting);
             chasedActress.Add(acting.ShortId);
             resultArray[bacon]++;
           }
       }
     }
   }
   unchasedMovie.Clear();
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:31,代码来源:KevinBaconNumbers.cs

示例8: Unpersist

 public override void Unpersist(SessionBase session)
 {
   m_folder.Files.Remove(this);
   if (m_fileContent != null)
     Content.Unpersist(session);
   base.Unpersist(session);
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:7,代码来源:FileInDb.cs

示例9: Artist

        public Artist(Link link, SessionBase session, bool browse = false)
        {
            this.Handle = libspotify.sp_link_as_artist(link.Handle);
            this._session = session;

            Init(browse);
        }
开发者ID:razims,项目名称:Spoti,代码行数:7,代码来源:Artist.cs

示例10: SearchGeoHashIndex

 public static HashSet<GeoObj> SearchGeoHashIndex(SessionBase session, double lat, double lon, double radius)
 {
   HashSet<GeoObj> resultSet = new HashSet<GeoObj>();
   WGS84Point center = new WGS84Point(lat, lon);
   GeoHashCircleQuery query = new GeoHashCircleQuery(center, radius); // radius in meters
   BoundingBox bbox = query.BoundingBox;
   var btreeSet = session.AllObjects<BTreeSet<GeoObj>>().FirstOrDefault();
   foreach (GeoHash hash in query.SearchHashes)
   {
     var itr = btreeSet.Iterator();
     itr.GoTo(new GeoObj(hash.LongValue));
     var current = itr.Current();
     while (current != null)
     {
       GeoHash geoHash = GeoHash.FromLongValue(current.GeoHash);
       if ((geoHash.SignificantBits >= hash.SignificantBits && geoHash.Within(hash)) || (geoHash.SignificantBits < hash.SignificantBits && hash.Within(geoHash)))
       {
         if (!(current.Latitude < bbox.MinLat || current.Latitude > bbox.MaxLat || current.Longitude < bbox.MinLon || current.Longitude > bbox.MaxLon))
           resultSet.Add(current);
         current = itr.Next();
       }
       else
         break;
     }
   }
   return resultSet;
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:27,代码来源:GeoHashQuery.cs

示例11: createDatabaseLocations

 public void createDatabaseLocations(SessionBase session)
 {
   session.BeginUpdate();
   Person person = new Person("Mats", "Persson", 54);
   session.Persist(person);
   session.Commit();
   verifyDatabaseLocations(session);
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:8,代码来源:MoveDatabaseLocations.cs

示例12: AspNetIdentity

 public AspNetIdentity(SessionBase session)
 {
   m_adapterMap = new BTreeMap<string, UserLoginInfoAdapter>(null, session);
   m_userSet = new BTreeSet<IdentityUser>(null, session);
   m_roleSet = new BTreeSet<IdentityRole>(null, session);
   m_emailToId = new BTreeMap<string, ulong>(null, session);
   m_userNameToId = new BTreeMap<string, ulong>(null, session);
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:8,代码来源:AspNetIdentity.cs

示例13: Root

 public Root(SessionBase session, ushort maxEntriesPerNode)
 { 
   CompareCustomerEmail compareCustomerEmail = new CompareCustomerEmail();
   CompareCustomerUserName compareCustomerUserName = new CompareCustomerUserName();
   customersByEmail = new BTreeSet<CustomerContact>(compareCustomerEmail, session, maxEntriesPerNode);
   customersByUserName = new BTreeSet<CustomerContact>(compareCustomerUserName, session, maxEntriesPerNode);
   lastCustomerIdNumber = 0;     
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:8,代码来源:Root.cs

示例14: Document

    public Document(UInt64 id): base(id) {} // for lookups

    public Document(string url, IndexRoot indexRoot, SessionBase session)
    {
      this.url = url;
      HashCodeComparer<Word> hashCodeComparer = new HashCodeComparer<Word>();
      m_wordHit = new BTreeMapOidShort<Word, WordHit>(null, session);
      m_wordHit.TransientBatchSize = 10000;
      wordSet = new BTreeSetOidShort<Word>(hashCodeComparer, session, 1500, sizeof(int));
    }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:10,代码来源:Document.cs

示例15: FederationViewModel

 public FederationViewModel(FederationInfo federationInfo) : base(null, true)
 {
   m_federationInfo = federationInfo;
   if (m_federationInfo.UsesServerClient || (SessionBase.IsSameHost(m_federationInfo.HostName, SessionBase.LocalHost) == false))
     m_session = new ServerClientSession(m_federationInfo.SystemDbsPath, m_federationInfo.HostName, m_federationInfo.WaitForMilliSeconds, m_federationInfo.UsePessimisticLocking == false);
   else
     m_session = new SessionNoServer(m_federationInfo.SystemDbsPath, m_federationInfo.WaitForMilliSeconds, m_federationInfo.UsePessimisticLocking == false);
   m_session.BeginRead();
 }
开发者ID:VelocityDB,项目名称:VelocityDB,代码行数:9,代码来源:FederationViewModel.cs


注:本文中的SessionBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。