Ejemplo n.º 1
0
 public WorkspaceAttribute(string name, DataLayerProviderKind kind)
 {
     this.Name = name;
     this.DataLayerProviderKind = kind;
     
     Standard = false;
     Priority = 5;
 }
Ejemplo n.º 2
0
        public WorkspaceAttribute(string name, DataLayerProviderKind kind)
        {
            this.Name = name;
            this.DataLayerProviderKind = kind;

            Standard = false;
            Priority = 5;
        }
Ejemplo n.º 3
0
 public Workspace(DataLayerProviderKind kind, String name, string contextNamespace, string contextTypeName)
     : this(kind, name)
 {
     _contextNamespace = contextNamespace;
     _contextTypeName = contextTypeName;
 }
Ejemplo n.º 4
0
        //Constructor
        public Workspace(DataLayerProviderKind kind, String name)
            : base(name)
        {
            AstoriaTestLog.WriteLineIgnore("Constructing workspace of type '" + this.GetType() + "' with name '" + this.Name + "'.");

            OnCreateNewWorkspaceEvent(new NewWorkspaceEventArgs(this));

            DataLayerProviderKind = kind;
            _serviceClassName = this.Name + "Service";
            _resourceTypeToWorkspaceTypeList = new AstoriaHashTable<ResourceType, Type>();
            _resourceTypeToClientTypeList = new AstoriaHashTable<ResourceType, Type>();
            Settings = new WorkspaceSettings(this);

            BeforeServiceCreation = new List<Action>();
            AfterServiceCreation = new List<Action>();

            BeforeServiceCreation.Add(this.InferAssociations);

            if (AstoriaTestProperties.UseOpenTypes)
                BeforeServiceCreation.Add(() => OpenTypesUtil.SetupDefaultOpenTypeAttributes(this));

            BeforeServiceCreation.Add(this.GenerateCallOrderInterceptorCode);

            BeforeServiceCreation.Add(this.GenerateCustomInterceptors);

            BeforeServiceCreation.Add(this.PopulateHostSourceFolder);

            // these can happen before or after, but lets do them before in case other events need them to be done already
            BeforeServiceCreation.Add(this.CreateLocalAssembly);
            BeforeServiceCreation.Add(this.PopulateClientTypes);

            this.DataGenerator = null;

            this.RequiredFrameworkSources = new List<string>() { "TestDataWebService.cs", "APICallLog.cs", "ProviderWrappers.cs" };
            this.ServiceModifications = new ServiceModifications(this);
        }