コード例 #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;
        }
コード例 #2
0
ファイル: Label.cs プロジェクト: itadapter/nfx
 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;
 }
コード例 #3
0
ファイル: WritingStreamer.cs プロジェクト: yhhno/nfx
 public abstract void Write(NFX.ApplicationModel.Pile.PilePointer? value);
コード例 #4
0
ファイル: WritingStreamer.cs プロジェクト: yhhno/nfx
 public abstract void Write(NFX.Glue.Protocol.MethodSpec spec);
コード例 #5
0
ファイル: WritingStreamer.cs プロジェクト: yhhno/nfx
 public abstract void Write(NFX.Glue.Protocol.TypeSpec spec);
コード例 #6
0
ファイル: WritingStreamer.cs プロジェクト: yhhno/nfx
 public abstract void Write(NFX.DataAccess.Distributed.GDID? value);
コード例 #7
0
ファイル: JokeInspectors.cs プロジェクト: itadapter/nfx
 public void Configure(NFX.Environment.IConfigSectionNode node)
 {
 }
コード例 #8
0
ファイル: SlimWriter.cs プロジェクト: itadapter/nfx
 public override void Write(NFX.ApplicationModel.Pile.PilePointer value)
 {
     this.Write(value.NodeID);
     this.Write(value.Segment);
     this.Write(value.Address);
 }
コード例 #9
0
ファイル: SlimWriter.cs プロジェクト: itadapter/nfx
 public override void Write(NFX.Glue.Protocol.TypeSpec spec)
 {
     this.Write( spec.m_Name );
      m_Stream.WriteBEUInt64( spec.m_Hash );
 }
コード例 #10
0
ファイル: SlimWriter.cs プロジェクト: itadapter/nfx
 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 );
 }
コード例 #11
0
ファイル: SlimWriter.cs プロジェクト: itadapter/nfx
 public override void Write(NFX.DataAccess.Distributed.GDID? value)
 {
     if (value.HasValue)
         {
           this.Write(true);
           Write(value.Value);
           return;
         }
         this.Write(false);
 }
コード例 #12
0
ファイル: SlimWriter.cs プロジェクト: itadapter/nfx
 public override void Write(NFX.DataAccess.Distributed.GDID value)
 {
     this.Write(value.Era);
     this.Write(value.ID);
 }
コード例 #13
0
ファイル: ObjectStoreService.cs プロジェクト: sergey-msu/nfx
        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);
          }
        }
コード例 #14
0
ファイル: CRUDwithRowConverter.cs プロジェクト: itadapter/nfx
        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;
        }
コード例 #15
0
ファイル: SlimWriter.cs プロジェクト: itadapter/nfx
 public override void Write(NFX.ApplicationModel.Pile.PilePointer? value)
 {
     if (value.HasValue)
         {
           this.Write(true);
           Write(value.Value);
           return;
         }
         this.Write(false);
 }
コード例 #16
0
ファイル: JSONLexer.cs プロジェクト: vlapchenko/nfx
 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;  
 }
コード例 #17
0
ファイル: GlueForm.cs プロジェクト: itadapter/nfx
 public BadContract(string node, NFX.Glue.Binding binding = null) : base(node, binding) {}