CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
MobileFactoryAttribute.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="MobileFactoryAttribute.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Specifies that the WCF data portal</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.ComponentModel;
10using System.Collections.Generic;
11using System.Linq;
12using System.Text;
13
14namespace Csla.Server
15{
21 [AttributeUsage(AttributeTargets.Class)]
22 public class MobileFactoryAttribute : Attribute
23 {
31 public string FactoryTypeName { get; private set; }
39 public string CreateMethodName { get; private set; }
47 public string FetchMethodName { get; private set; }
55 public string UpdateMethodName { get; private set; }
63 public string DeleteMethodName { get; private set; }
71 public string ExecuteMethodName { get; private set; }
72
83 public MobileFactoryAttribute(string factoryType)
84 {
85 this.FactoryTypeName = factoryType;
86 this.CreateMethodName = "Create";
87 this.FetchMethodName = "Fetch";
88 this.UpdateMethodName = "Update";
89 this.DeleteMethodName = "Delete";
90 this.ExecuteMethodName = "Execute";
91 }
92
104 public MobileFactoryAttribute(string factoryType, string createMethod, string fetchMethod)
105 {
106 this.FactoryTypeName = factoryType;
107 this.CreateMethodName = createMethod;
108 this.FetchMethodName = fetchMethod;
109 this.UpdateMethodName = "Update";
110 this.DeleteMethodName = "Delete";
111 this.ExecuteMethodName = "Execute";
112 }
113
123 public MobileFactoryAttribute(string factoryType, string fetchMethod)
124 {
125 this.FactoryTypeName = factoryType;
126 this.FetchMethodName = fetchMethod;
127 this.CreateMethodName = "Create";
128 this.UpdateMethodName = "Update";
129 this.DeleteMethodName = "Delete";
130 this.ExecuteMethodName = "Execute";
131 }
132
149 string factoryType, string createMethod, string fetchMethod, string updateMethod, string deleteMethod)
150 {
151 this.FactoryTypeName = factoryType;
152 this.CreateMethodName = createMethod;
153 this.FetchMethodName = fetchMethod;
154 this.UpdateMethodName = updateMethod;
155 this.DeleteMethodName = deleteMethod;
156 this.ExecuteMethodName = "Execute";
157 }
158
177 string factoryType, string createMethod, string fetchMethod, string updateMethod, string deleteMethod, string executeMethod)
178 {
179 this.FactoryTypeName = factoryType;
180 this.CreateMethodName = createMethod;
181 this.FetchMethodName = fetchMethod;
182 this.UpdateMethodName = updateMethod;
183 this.DeleteMethodName = deleteMethod;
184 this.ExecuteMethodName = executeMethod;
185 }
186
187 }
188}
Specifies that the WCF data portal should invoke a factory object rather than the business object.
MobileFactoryAttribute(string factoryType, string createMethod, string fetchMethod, string updateMethod, string deleteMethod)
Creates an instance of the attribute.
MobileFactoryAttribute(string factoryType, string createMethod, string fetchMethod)
Creates an instance of the attribute.
MobileFactoryAttribute(string factoryType, string createMethod, string fetchMethod, string updateMethod, string deleteMethod, string executeMethod)
Creates an instance of the attribute.
MobileFactoryAttribute(string factoryType, string fetchMethod)
Creates an instance of the attribute.
string ExecuteMethodName
Name of the method to call for a execute operation.
string FactoryTypeName
Assembly qualified type name of the factory object.
string UpdateMethodName
Name of the method to call for a update operation.
string DeleteMethodName
Name of the method to call for a delete operation.
string FetchMethodName
Name of the method to call for a fetch operation.
MobileFactoryAttribute(string factoryType)
Creates an instance of the attribute.
string CreateMethodName
Name of the method to call for a create operation.