Esempio n. 1
0
 public virtual string GetName()
 {
     NeoDatis.Odb.Core.Layers.Layer3.IBaseIdentification p = fsiToApplyWriteActions.GetParameters
                                                                 ();
     if (p is NeoDatis.Odb.Core.Layers.Layer3.IOFileParameter)
     {
         NeoDatis.Odb.Core.Layers.Layer3.IOFileParameter ifp = (NeoDatis.Odb.Core.Layers.Layer3.IOFileParameter
                                                                )fsiToApplyWriteActions.GetParameters();
         System.Text.StringBuilder buffer = new System.Text.StringBuilder(ifp.GetCleanFileName
                                                                              ()).Append("-").Append(creationDateTime).Append("-").Append(session.GetId()).Append
                                                (".transaction");
         return(buffer.ToString());
     }
     if (p is NeoDatis.Odb.Core.Layers.Layer3.IOSocketParameter)
     {
         NeoDatis.Odb.Core.Layers.Layer3.IOSocketParameter sp = (NeoDatis.Odb.Core.Layers.Layer3.IOSocketParameter
                                                                 )fsiToApplyWriteActions.GetParameters();
         return(sp.GetBaseIdentifier());
     }
     throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.UnsupportedIoType
                                                .AddParameter(p.GetType().FullName));
 }
Esempio n. 2
0
 internal virtual NeoDatis.Odb.Core.Layers.Layer3.IBaseIdentification GetParameters
     (bool canWrite)
 {
     NeoDatis.Odb.Core.Layers.Layer3.IBaseIdentification p = fsiToApplyWriteActions.GetParameters
                                                                 ();
     if (p is NeoDatis.Odb.Core.Layers.Layer3.IOFileParameter)
     {
         NeoDatis.Odb.Core.Layers.Layer3.IOFileParameter ifp = (NeoDatis.Odb.Core.Layers.Layer3.IOFileParameter
                                                                )fsiToApplyWriteActions.GetParameters();
         System.Text.StringBuilder buffer = new System.Text.StringBuilder(ifp.GetDirectory
                                                                              ()).Append("/").Append(ifp.GetCleanFileName()).Append("-").Append(creationDateTime
                                                                                                                                                ).Append("-").Append(session.GetId()).Append(".transaction");
         return(new NeoDatis.Odb.Core.Layers.Layer3.IOFileParameter(buffer.ToString(), canWrite
                                                                    , ifp.GetUserName(), ifp.GetPassword()));
     }
     if (p is NeoDatis.Odb.Core.Layers.Layer3.IOSocketParameter)
     {
         NeoDatis.Odb.Core.Layers.Layer3.IOSocketParameter sp = (NeoDatis.Odb.Core.Layers.Layer3.IOSocketParameter
                                                                 )fsiToApplyWriteActions.GetParameters();
         return(new NeoDatis.Odb.Core.Layers.Layer3.IOSocketParameter(sp.GetDestinationHost
                                                                          (), sp.GetPort(), sp.GetBaseIdentifier(), NeoDatis.Odb.Core.Layers.Layer3.IOSocketParameter
                                                                      .TypeTransaction, creationDateTime, null, null));
     }
     throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.UnsupportedIoType
                                                .AddParameter(p.GetType().FullName));
 }