private static extern int psoFolderCreateObject( IntPtr folderHandle, string objectName, UInt32 nameLengthInBytes, ref ObjectDefinition pDefinition, ref KeyDefinition pKey, FieldDefinition [] pFields);
private static extern int psoCreateObject( IntPtr sessionHandle, string objectName, UInt32 nameLengthInBytes, ref ObjectDefinition definition, ref KeyDefinition key, FieldDefinition[] fields);
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public void CreateObject( String objectName, ref ObjectDefinition definition, ref KeyDefinition key, FieldDefinition[] fields) { int rc; if (handle == (IntPtr)0) { rc = (int)PhotonErrors.NULL_HANDLE; throw new PhotonException(PhotonException.PrepareException("Session.DestroyObject", rc), rc); } rc = psoCreateObject(handle, objectName, (UInt32)objectName.Length, ref definition, ref key, fields ); if (rc != 0) { throw new PhotonException(PhotonException.PrepareException(handle, "Session.DestroyObject"), rc); } }
private static extern int psoQueueDefinition( IntPtr objectHandle, ref ObjectDefinition definition);
internal static extern int psoFastMapDefinition( IntPtr objectHandle, ref ObjectDefinition definition);
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public void Definition(ObjectDefinition definition) { }
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public void CreateObject( String objectName, ObjectDefinition definition) { }
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public void GetDefinition(String objectName, ObjectDefinition definition) { }
private static extern int psoGetDefinition( IntPtr sessionHandle, [MarshalAs(UnmanagedType.LPStr)] string objectName, UInt32 nameLengthInBytes, ref ObjectDefinition definition);
// --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- public void CreateObject(String objectName, ref ObjectDefinition pDefinition, ref KeyDefinition pKey, FieldDefinition [] pFields) { int rc; if (handle == (IntPtr)0) { rc = (int)PhotonErrors.NULL_HANDLE; throw new PhotonException(PhotonException.PrepareException("Folder.CreateObject", rc), rc); } rc = psoFolderCreateObject(handle, objectName, (UInt32)objectName.Length, ref pDefinition, ref pKey, pFields ); if (rc != 0) { throw new PhotonException(PhotonException.PrepareException(sessionHandle, "Folder.CreateObject"), rc); } }