Exemple #1
0
 private void ClassLoaderMissed(ClassLoader classLoader, CatalogDeviceSession session, ClassDefinition classDefinition)
 {
     if ((_session != null) && (_session._server != null))
     {
         _session._server.ClassLoaderMissed(this, classLoader, classDefinition);
     }
 }
Exemple #2
0
 private void DoMiss(CatalogDeviceSession session, ClassDefinition classDefinition)
 {
     if (OnMiss != null)
     {
         OnMiss(this, session, classDefinition);
     }
 }
Exemple #3
0
 public void IncludeDependencies(CatalogDeviceSession session, Catalog sourceCatalog, Catalog targetCatalog, EmitMode mode)
 {
     foreach (Column column in Columns)
     {
         column.DataType.IncludeDependencies(session, sourceCatalog, targetCatalog, mode);
     }
 }
Exemple #4
0
 public override void IncludeDependencies(CatalogDeviceSession session, Catalog sourceCatalog, Catalog targetCatalog, EmitMode mode)
 {
     if (!targetCatalog.Contains(Name))
     {
         base.IncludeDependencies(session, sourceCatalog, targetCatalog, mode);
         targetCatalog.Add(this);
     }
 }
Exemple #5
0
 public override void DetermineRemotable(CatalogDeviceSession session)
 {
                 #if TRIGGERSREMOTABLE
     base.DetermineRemotable(ACatalog);
                 #else
     IsRemotable = false;
                 #endif
 }
Exemple #6
0
        public RegisteredClass GetClass(CatalogDeviceSession session, ClassDefinition classDefinition)
        {
            if (!_classes.Contains(classDefinition.ClassName))
            {
                DoMiss(session, classDefinition);
            }

            return(_classes[classDefinition.ClassName]);
        }
Exemple #7
0
        public object CreateObject(CatalogDeviceSession session, ClassDefinition classDefinition, object[] actualParameters)
        {
            object objectValue = Activator.CreateInstance(CreateType(session, classDefinition), actualParameters);

            foreach (ClassAttributeDefinition attribute in classDefinition.Attributes)
            {
                SetProperty(objectValue, attribute.AttributeName, attribute.AttributeValue);
            }
            return(objectValue);
        }
Exemple #8
0
        public Type CreateType(CatalogDeviceSession session, ClassDefinition classDefinition)
        {
            RegisteredClass classValue = GetClass(session, classDefinition);

            string className = classValue.ClassName;

            try
            {
                return(Type.GetType(className, true));
            }
            catch (Exception E)
            {
                throw new ServerException(ServerException.Codes.ClassLoadError, E, className);
            }
        }
 public EmissionContext
 (
     CatalogDeviceSession session,
     Catalog catalog,
     EmitMode mode,
     ObjectList requestedObjects,
     string libraryName,
     bool includeSystem,
     bool includeGenerated,
     bool includeDependents,
     bool includeObject
 ) : base()
 {
     Session           = session;
     Catalog           = catalog;
     Mode              = mode;
     RequestedObjects  = requestedObjects;
     LibraryName       = libraryName;
     IncludeSystem     = includeSystem;
     IncludeGenerated  = includeGenerated;
     IncludeDependents = includeDependents;
     IncludeObject     = includeObject;
 }
Exemple #10
0
 public override void IncludeDependencies(CatalogDeviceSession session, Catalog sourceCatalog, Catalog targetCatalog, EmitMode mode)
 {
     if ((SourceOperatorName != null) && (mode == EmitMode.ForRemote))
     {
         var sourceObjectName = MetaData.GetTag(MetaData, "DAE.SourceObjectName", SourceOperatorName);
         sourceCatalog[sourceObjectName].IncludeDependencies(session, sourceCatalog, targetCatalog, mode);
     }
     else
     {
         if (!targetCatalog.Contains(this))
         {
             targetCatalog.Add(this);
             base.IncludeDependencies(session, sourceCatalog, targetCatalog, mode);
             foreach (Operand operand in Operands)
             {
                 operand.DataType.IncludeDependencies(session, sourceCatalog, targetCatalog, mode);
             }
             if (ReturnDataType != null)
             {
                 ReturnDataType.IncludeDependencies(session, sourceCatalog, targetCatalog, mode);
             }
         }
     }
 }
Exemple #11
0
 public string ScriptDropCatalog(CatalogDeviceSession session)
 {
     return(new D4TextEmitter().Emit(_catalog.EmitDropStatement(session)));
 }
Exemple #12
0
 public void IncludeDependencies(CatalogDeviceSession session, Catalog sourceCatalog, Catalog targetCatalog, EmitMode mode)
 {
     ElementType.IncludeDependencies(session, sourceCatalog, targetCatalog, mode);
 }
Exemple #13
0
 private void ClassLoaderMiss(ClassLoader classLoader, CatalogDeviceSession session, ClassDefinition classDefinition)
 {
     // Ensure that the library containing the class is loaded.
     ((ServerCatalogDeviceSession)session).LoadLibraryForClass(classDefinition);
 }
Exemple #14
0
 public bool HasRight(string right)
 {
     return(InATCreationContext || CatalogDeviceSession.UserHasRight(SecurityContext.User.ID, right));
 }
Exemple #15
0
 public void IncludeDependencies(CatalogDeviceSession session, Catalog sourceCatalog, Catalog targetCatalog, EmitMode mode)
 {
 }
Exemple #16
0
 public string ScriptDropLibrary(CatalogDeviceSession session, string libraryName)
 {
     return(new D4TextEmitter().Emit(_catalog.EmitDropStatement(session, new string[] { }, libraryName, false, false, true, true)));
 }
Exemple #17
0
 public string ScriptLibrary(CatalogDeviceSession session, string libraryName)
 {
     return(new D4TextEmitter().Emit(_catalog.EmitStatement(session, EmitMode.ForCopy, libraryName, false)));
 }
Exemple #18
0
 /// <summary> Emits the creation script for the catalog and returns it as a string. </summary>
 public string ScriptCatalog(CatalogDeviceSession session)
 {
     return(new D4TextEmitter().Emit(_catalog.EmitStatement(session, EmitMode.ForCopy, false)));
 }