示例#1
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));
 }