public MapSession(IMapObjects mapObjects) : this() { Id = Guid.NewGuid(); IsNew = true; MapObjects = mapObjects; }
public SPGlymaUser(SPWeb web, IMapObjects mapObjectBootstrapper) { Web = web; MapObjectBootstrapper = mapObjectBootstrapper; if (web.Properties.ContainsKey("Glyma.SecurityDatabaseServer") && web.Properties.ContainsKey("Glyma.SecurityDatabaseName") && web.Properties.ContainsKey("Glyma.SecurableContextId")) { SecurityDatabaseServer = web.Properties["Glyma.SecurityDatabaseServer"]; SecurityDatabaseName = web.Properties["Glyma.SecurityDatabaseName"]; SecurableContextId = int.Parse(web.Properties["Glyma.SecurableContextId"]); } using (SecurityDBDataContext dataContext = new SecurityDBDataContext(Connection)) { var securableContext = (from dcSecurableContext in dataContext.SecurableContexts where dcSecurableContext.SecurableContextId == SecurableContextId select dcSecurableContext).FirstOrDefault(); if (securableContext == null) { return; } SecurableContextName = securableContext.SecurableContextName; SecurableContextUid = securableContext.SecurableContextUid; } }
public MapTransactionWrapper(IMapObjects mapObjects) : this() { MapObjects = mapObjects; Core.SessionUid = MapObjects.Session.Id; Core.User = MapObjects.Session.User; Core.TransactionTimestamp = DateTime.Now; }
public void LoadNodeRecord(IMapObjects mapObjects, IDataReader record) { if (record["MapNodeUid"] != null && record["MapNodeUid"] != DBNull.Value) { MapNodeUid = (Guid)record["MapNodeUid"]; } if (record["NodeUid"] != null && record["NodeUid"] != DBNull.Value) { NodeUid = (Guid)record["NodeUid"]; } if (record["NodeOriginalId"] != null && record["NodeOriginalId"] != DBNull.Value) { NodeOriginalId = (string)record["NodeOriginalId"]; } if (record["NodeTypeUid"] != null && record["NodeTypeUid"] != DBNull.Value) { NodeTypeUid = (Guid)record["NodeTypeUid"]; } if (record["DomainUid"] != null && record["DomainUid"] != DBNull.Value) { DomainUid = (Guid)record["DomainUid"]; } if (record["RootMapUid"] != null && record["RootMapUid"] != DBNull.Value) { RootMapUid = (Guid)record["RootMapUid"]; } if (record["Created"] != null && record["Created"] != DBNull.Value) { Created = (DateTime)record["Created"]; } if (record["Modified"] != null && record["Modified"] != DBNull.Value) { Modified = (DateTime)record["Modified"]; } if (record["CreatedBy"] != null && record["CreatedBy"] != DBNull.Value) { CreatedByLogin = (string)record["CreatedBy"]; CreatedBy = mapObjects.FindUsersName(CreatedByLogin); } if (record["ModifiedBy"] != null && record["ModifiedBy"] != DBNull.Value) { ModifiedByLogin = (string)record["ModifiedBy"]; ModifiedBy = mapObjects.FindUsersName(ModifiedByLogin); } }
public SessionFinalisation(IMapObjects mapObjects, Guid sessionId) { MapObjects = mapObjects; SessionId = sessionId; }
public MapSchema(IMapObjects mapObjects) { MapObjects = mapObjects; LoadTypesFromDb(); }
public QueryNodes(IMapObjects mapObjects) { MapObjects = mapObjects; }
public CreateRootMap(IMapObjects mapObjects) { MapObjects = mapObjects; }
public MapParameters(IMapObjects mapObjects) : this() { MapObjects = mapObjects; }
public void AddMetadataRecord(IMapObjects mapObjects, IDataReader record) { if (record["NodeUid"] != null && record["NodeUid"] != DBNull.Value) { DateTime?metadataCreated = null; DateTime?metadataModified = null; string metadataCreatedBy = null; string metadataModifiedBy = null; string metadataCreatedByLogin = null; string metadataModifiedByLogin = null; if (record["Created"] != null && record["Created"] != DBNull.Value) { metadataCreated = (DateTime)record["Created"]; } if (record["Modified"] != null && record["Modified"] != DBNull.Value) { metadataModified = (DateTime)record["Modified"]; } if (Created > metadataCreated) { if (record["CreatedBy"] != null && record["CreatedBy"] != DBNull.Value) { metadataCreatedByLogin = (string)record["CreatedBy"]; metadataCreatedBy = mapObjects.FindUsersName(metadataCreatedByLogin); } if (!string.IsNullOrEmpty(metadataCreatedByLogin)) { Created = metadataCreated; CreatedBy = metadataCreatedBy; CreatedByLogin = metadataCreatedByLogin; } } if (Modified < metadataModified) { if (record["ModifiedBy"] != null && record["ModifiedBy"] != DBNull.Value) { metadataModifiedByLogin = (string)record["ModifiedBy"]; metadataModifiedBy = mapObjects.FindUsersName(metadataModifiedByLogin); } if (!string.IsNullOrEmpty(metadataModifiedByLogin)) { Modified = metadataModified; ModifiedBy = metadataModifiedBy; ModifiedByLogin = metadataModifiedByLogin; } } if (record["MetadataName"] != null && record["MetadataName"] != DBNull.Value) { string metadataName = (string)record["MetadataName"]; if (record["MetadataValue"] != null & record["MetadataValue"] != DBNull.Value) { string metadataValue = (string)record["MetadataValue"]; Metadata[metadataName] = metadataValue; } else { Metadata[metadataName] = null; } } } }
public MapSession(IMapObjects mapObjects, Guid sessionId) : this(mapObjects) { Id = sessionId; IsNew = false; }
public void AddMetadataRecord(IMapObjects mapObjects, IDataReader record) { if (record["NodeUid"] != null && record["NodeUid"] != DBNull.Value) { DateTime? metadataCreated = null; DateTime? metadataModified = null; string metadataCreatedBy = null; string metadataModifiedBy = null; string metadataCreatedByLogin = null; string metadataModifiedByLogin = null; if (record["Created"] != null && record["Created"] != DBNull.Value) { metadataCreated = (DateTime)record["Created"]; } if (record["Modified"] != null && record["Modified"] != DBNull.Value) { metadataModified = (DateTime)record["Modified"]; } if (Created > metadataCreated) { if (record["CreatedBy"] != null && record["CreatedBy"] != DBNull.Value) { metadataCreatedByLogin = (string)record["CreatedBy"]; metadataCreatedBy = mapObjects.FindUsersName(metadataCreatedByLogin); } if (!string.IsNullOrEmpty(metadataCreatedByLogin)) { Created = metadataCreated; CreatedBy = metadataCreatedBy; CreatedByLogin = metadataCreatedByLogin; } } if (Modified < metadataModified) { if (record["ModifiedBy"] != null && record["ModifiedBy"] != DBNull.Value) { metadataModifiedByLogin = (string)record["ModifiedBy"]; metadataModifiedBy = mapObjects.FindUsersName(metadataModifiedByLogin); } if (!string.IsNullOrEmpty(metadataModifiedByLogin)) { Modified = metadataModified; ModifiedBy = metadataModifiedBy; ModifiedByLogin = metadataModifiedByLogin; } } if (record["MetadataName"] != null && record["MetadataName"] != DBNull.Value) { string metadataName = (string)record["MetadataName"]; if (record["MetadataValue"] != null & record["MetadataValue"] != DBNull.Value) { string metadataValue = (string)record["MetadataValue"]; Metadata[metadataName] = metadataValue; } else { Metadata[metadataName] = null; } } } }