예제 #1
0
파일: RiakObject.cs 프로젝트: bubbafat/Hebo
        public static RiakObject Load(Bucket bucket, string keyName, string siblingId)
        {
            RiakObject ro = new RiakObject
                                {
                                    Bucket = bucket, 
                                    SiblingId = siblingId, 
                                    KeyName = keyName
                                };
            ro.Refresh();

            return ro;
        }
예제 #2
0
파일: RiakObject.cs 프로젝트: bubbafat/Hebo
        public static RiakObject Load(Bucket bucket, string keyName, bool autoRefresh)
        {
            RiakObject ro = new RiakObject
                                {
                                    Bucket = bucket, 
                                    KeyName = keyName
                                };

            if (autoRefresh)
            {
                if(string.IsNullOrEmpty(keyName))
                {
                    throw new RiakClientException("Loading a RiakObject requires a key name.");
                }

                ro.Refresh();
            }

            return ro;
        }