本文整理汇总了C#中Alias类的典型用法代码示例。如果您正苦于以下问题:C# Alias类的具体用法?C# Alias怎么用?C# Alias使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Alias类属于命名空间,在下文中一共展示了Alias类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public static void Execute()
{
// horrible hack
Clear clear = new Clear();
Create create = new Create();
Delete delete = new Delete();
Exit exit = new Exit();
Ping ping = new Ping();
SList slist = new SList();
Start start = new Start();
Help help = new Help();
Alias alias = new Alias();
View view = new View();
// im sorry mom
HelpDisplay.Add(" " + clear.Name + " - " + clear.Description);
HelpDisplay.Add(" " + create.Name + " - " + create.Description);
HelpDisplay.Add(" " + delete.Name + " - " + delete.Description);
HelpDisplay.Add(" " + exit.Name + " - " + exit.Description);
HelpDisplay.Add(" " + ping.Name + " - " + ping.Description);
HelpDisplay.Add(" " + slist.Name + " - " + slist.Description);
HelpDisplay.Add(" " + start.Name + " - " + start.Description);
HelpDisplay.Add(" " + alias.Name + " - " + alias.Description);
HelpDisplay.Add(" " + help.Name + " - " + help.Description);
HelpDisplay.Add(" " + view.Name + " - " + view.Description);
foreach (string command in HelpDisplay)
Console.WriteLine(command);
HelpDisplay.Clear(); // static list.
}
示例2: AggregateSubqueryExpression
public AggregateSubqueryExpression(Alias groupByAlias, Expression aggregateInGroupSelect, ScalarExpression aggregateAsSubquery)
: base(MongoExpressionType.AggregateSubquery, aggregateAsSubquery.Type)
{
GroupByAlias = groupByAlias;
AggregateInGroupSelect = aggregateInGroupSelect;
AggregateAsSubquery = aggregateAsSubquery;
}
示例3: VisitSelect
protected override Expression VisitSelect(SelectExpression select)
{
var newAlias = new Alias();
_map[select.Alias] = newAlias;
select = (SelectExpression)base.VisitSelect(select);
return new SelectExpression(newAlias, select.Fields, select.From, select.Where, select.OrderBy, select.GroupBy, select.IsDistinct, select.Skip, select.Take);
}
示例4: FieldExpression
public FieldExpression(Expression expression, Alias alias, string name)
: base(MongoExpressionType.Field, expression.Type)
{
Alias = alias;
Expression = expression;
Name = name;
}
示例5: GenerateMixins
internal ReadOnlyCollection<MixinEntityExpression> GenerateMixins(Alias tableAlias, QueryBinder binder, Expression id)
{
if (this.Mixins == null)
return null;
return this.Mixins.Values.Select(m => (MixinEntityExpression)m.GetExpression(tableAlias, binder, id)).ToReadOnly();
}
示例6: FieldExpression
public FieldExpression(Expression expression, Alias alias, string name, BsonMemberMap memberMap)
: base(MongoExpressionType.Field, expression.Type)
{
Alias = alias;
Expression = expression;
Name = name;
MemberMap = memberMap;
}
示例7: MailSave
int _idCounter; //id作成のための順次番号生成カウンタ
#endregion Fields
#region Constructors
public MailSave(MailBox mailBox, Alias alias,MailQueue mailQueue, Logger logger, ReceivedHeader receivedHeader, List<string> domainList)
{
_mailBox = mailBox;
_alias = alias;
_mailQueue = mailQueue;
_logger = logger;
_receivedHeader = receivedHeader;
_domainList = domainList;
_localBox = new LocalBox(_logger);
}
示例8: CompareAlias
protected virtual bool CompareAlias(Alias a, Alias b)
{
if (_aliasScope != null)
{
Alias mapped;
if (_aliasScope.TryGetValue(a, out mapped))
return mapped == b;
}
return a == b;
}
示例9: Warn
public Warn()
{
#if JTVBOT
Privilege = PrivilegeLevel.Voiced;
#else
Privilege = PrivilegeLevel.None;
#endif
Alias alias = new Alias(this, "+w");
alias.RequiresPrefix = false;
alias.ForbidsPrefix = true;
}
示例10: NoLeadingUnderscores
public void NoLeadingUnderscores()
{
Alias alias = new Alias( "suffix" );
Dialect.Dialect dialect = new Dialect.MsSql2000Dialect();
Assert.IsFalse(
alias.ToAliasString( "__someIdentifier", dialect )
.StartsWith( "_" ) );
Assert.IsFalse(
alias.ToUnquotedAliasString( "__someIdentifier", dialect )
.StartsWith( "_" ) );
}
示例11: GetIdExpression
internal Expression GetIdExpression(Alias alias)
{
var field = Fields.TryGetC(Table.fiId.Name);
if (field == null)
{
field = Fields.Values.FirstOrDefault(f => f .Field is IColumn && ((IColumn)f.Field).PrimaryKey);
if (field == null)
return null;
}
return field.Field.GetExpression(alias, null, null);
}
示例12: Alias
public void IsUserによる登録ユーザの確認(String user, bool expected)
{
//setUp
var sut = new Alias( _domainList, _mailBox);
sut.Add("dmy","user1,user2",new Logger());
sut.Add("user1", "user3,user4", new Logger());
var rcptList = new List<MailAddress>();
rcptList.Add(new MailAddress("[email protected]"));
//exercise
var actual = sut.IsUser(user);
//verify
Assert.That(actual, Is.EqualTo(expected));
}
示例13: Foo
public void Foo(bool b)
{
Alias tmp = new Alias();
tmp.x = -11;
Alias alias = tmp;
if(b)
{
alias.x = 10;
}
Contract.Assert(tmp.x == -11);
}
示例14: ProjectColumns
static internal ProjectedColumns ProjectColumns(Expression projector, Alias newAlias, bool isGroupKey = false, bool selectTrivialColumns = false)
{
Expression newProj;
var candidates = DbExpressionNominator.Nominate(projector, out newProj, isGroupKey: isGroupKey);
ColumnProjector cp = new ColumnProjector
{
newAlias = newAlias,
candidates = candidates,
projectTrivialColumns = selectTrivialColumns
};
Expression e = cp.Visit(newProj);
return new ProjectedColumns(e, cp.generator.Columns.ToReadOnly());
}
示例15: SelectExpression
public SelectExpression(Alias alias, IEnumerable<FieldDeclaration> fields, Expression from, Expression where, IEnumerable<OrderExpression> orderBy, Expression groupBy, bool isDistinct, Expression skip, Expression take)
: base(MongoExpressionType.Select, typeof(void), alias)
{
_fields = fields as ReadOnlyCollection<FieldDeclaration> ?? new List<FieldDeclaration>(fields).AsReadOnly();
_orderBy = orderBy as ReadOnlyCollection<OrderExpression>;
if (_orderBy == null && orderBy != null)
_orderBy = new List<OrderExpression>(orderBy).AsReadOnly();
_isDistinct = isDistinct;
_from = from;
_groupBy = groupBy;
_take = take;
_where = where;
_skip = skip;
}