Esempio n. 1
0
        protected internal DropBoxFileSystemSession(NFX.IO.FileSystem.FileSystem fs, IFileSystemHandle handle,
                                                    FileSystemSessionConnectParams cParams) : base(fs, handle, cParams)
        {
            if(fs == null)
                throw new ArgumentNullException("fs");

            if (cParams == null)
                throw new ArgumentNullException("cParams");

            DropBoxFileSystemSessionConnectParams pr = cParams as DropBoxFileSystemSessionConnectParams;
            if (pr == null)
                throw new NFXException(StringConsts.FS_SESSION_BAD_PARAMS_ERROR + GetType() + ".ctor_DropBoxFileSystemSession");

            ConnectParameters = pr;
        }
Esempio n. 2
0
 public Label(object id,
     string url,
     byte[] data,
     LabelFormat format,
     string trackingNumber,
     Carrier carrier,
     NFX.Financial.Amount rate)
     : this()
 {
     ID = id;
       CreateDate = App.TimeSource.UTCNow;
       URL = url;
       Data = data;
       Format = format;
       TrackingNumber = trackingNumber;
       Carrier = carrier;
       Rate = rate;
 }
Esempio n. 3
0
 public abstract void Write(NFX.ApplicationModel.Pile.PilePointer? value);
Esempio n. 4
0
 public abstract void Write(NFX.Glue.Protocol.MethodSpec spec);
Esempio n. 5
0
 public abstract void Write(NFX.Glue.Protocol.TypeSpec spec);
Esempio n. 6
0
 public abstract void Write(NFX.DataAccess.Distributed.GDID? value);
Esempio n. 7
0
 public void Configure(NFX.Environment.IConfigSectionNode node)
 {
 }
Esempio n. 8
0
 public override void Write(NFX.ApplicationModel.Pile.PilePointer value)
 {
     this.Write(value.NodeID);
     this.Write(value.Segment);
     this.Write(value.Address);
 }
Esempio n. 9
0
 public override void Write(NFX.Glue.Protocol.TypeSpec spec)
 {
     this.Write( spec.m_Name );
      m_Stream.WriteBEUInt64( spec.m_Hash );
 }
Esempio n. 10
0
 public override void Write(NFX.Glue.Protocol.MethodSpec spec)
 {
     this.Write( spec.m_MethodName );
      m_Stream.WriteBEUInt64( spec.m_ReturnType );
      this.Write( spec.m_Signature );
      m_Stream.WriteBEUInt64( spec.m_Hash );
 }
Esempio n. 11
0
 public override void Write(NFX.DataAccess.Distributed.GDID? value)
 {
     if (value.HasValue)
         {
           this.Write(true);
           Write(value.Value);
           return;
         }
         this.Write(false);
 }
Esempio n. 12
0
 public override void Write(NFX.DataAccess.Distributed.GDID value)
 {
     this.Write(value.Era);
     this.Write(value.ID);
 }
Esempio n. 13
0
        protected override void DoConfigure(NFX.Environment.IConfigSectionNode node)
        {
          try
          {
            base.DoConfigure(node);

            var sguid = node.AttrByName(CONFIG_GUID_ATTR).ValueAsString();
            if (!string.IsNullOrEmpty(sguid))
              StoreGUID = new Guid(sguid);


            m_Provider = FactoryUtils.MakeAndConfigure(node[CONFIG_PROVIDER_SECT]) as ObjectStoreProvider;

            if (m_Provider == null)
              throw new NFXException("Provider is null");

            m_Provider.__setComponentDirector(this);

            ObjectLifeSpanMS = node.AttrByName(CONFIG_OBJECT_LIFE_SPAN_MS_ATTR).ValueAsInt(DEFAULT_OBJECT_LEFESPAN_MS);

            BucketCount = node.AttrByName(CONFIG_BUCKET_COUNT_ATTR).ValueAsInt(DEFAULT_BUCKET_COUNT);

          }
          catch (Exception error)
          {
            throw new NFXException(StringConsts.OBJSTORESVC_PROVIDER_CONFIG_ERROR + error.Message, error);
          }
        }
Esempio n. 14
0
        public override bool Equals(NFX.DataAccess.CRUD.Row other)
        {
            var or = other as TestRow;
            if (or==null) return false;

            foreach(var f in this.Schema)
            {
              var v1 = this.GetFieldValue(f);
              var v2 = or.GetFieldValue(f);

              if (v1==null)
              {
              if (v2==null) continue;
              else return false;
              }
              else if (v2 == null)
              return false;

              if (v1 is byte[])
              {
            return ((byte[])v1).SequenceEqual((byte[])v2);
              }

              if (!v1.Equals( v2 )) return false;
            }

            return true;
        }
Esempio n. 15
0
 public override void Write(NFX.ApplicationModel.Pile.PilePointer? value)
 {
     if (value.HasValue)
         {
           this.Write(true);
           Write(value.Value);
           return;
         }
         this.Write(false);
 }
Esempio n. 16
0
 public override bool Match(NFX.CodeAnalysis.JSON.JSONLexer content)
 {
   return content.LazyFSM(
          (s,t) => s.LoopUntilMatch(
                                     (ss, tk) => tk.LoopUntilAny("First-Name","FirstName","first_name"),
                                     (ss, tk) => tk.IsAnyOrAbort(JSONTokenType.tColon),
                                     (ss, tk) => tk.IsAnyOrAbort(JSONTokenType.tStringLiteral),
                                     (ss, tk) => FSMI.TakeAndComplete
                                   ),
          (s,t) => FSMI.Take
      ) != null;  
 }
Esempio n. 17
0
 public BadContract(string node, NFX.Glue.Binding binding = null) : base(node, binding) {}