当前位置: 首页>>代码示例>>C#>>正文


C# Alias类代码示例

本文整理汇总了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.
        }
开发者ID:Blankpanda,项目名称:chat_client,代码行数:32,代码来源:Help.cs

示例2: AggregateSubqueryExpression

 public AggregateSubqueryExpression(Alias groupByAlias, Expression aggregateInGroupSelect, ScalarExpression aggregateAsSubquery)
     : base(MongoExpressionType.AggregateSubquery, aggregateAsSubquery.Type)
 {
     GroupByAlias = groupByAlias;
     AggregateInGroupSelect = aggregateInGroupSelect;
     AggregateAsSubquery = aggregateAsSubquery;
 }
开发者ID:hitesh97,项目名称:fluent-mongo,代码行数:7,代码来源:AggregateSubqueryExpression.cs

示例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);
 }
开发者ID:gaoninggn,项目名称:mongodb-csharp,代码行数:7,代码来源:QueryDuplicator.cs

示例4: FieldExpression

 public FieldExpression(Expression expression, Alias alias, string name)
     : base(MongoExpressionType.Field, expression.Type)
 {
     Alias = alias;
     Expression = expression;
     Name = name;
 }
开发者ID:rhwy,项目名称:fluent-mongo,代码行数:7,代码来源:FieldExpression.cs

示例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();
        }
开发者ID:signumsoftware,项目名称:framework,代码行数:7,代码来源:Schema.Expressions.cs

示例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;
 }
开发者ID:hitesh97,项目名称:fluent-mongo,代码行数:8,代码来源:FieldExpression.cs

示例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);
        }
开发者ID:jsakamoto,项目名称:bjd5,代码行数:16,代码来源:MailSave.cs

示例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;
 }
开发者ID:hitesh97,项目名称:fluent-mongo,代码行数:10,代码来源:MongoExpressionComparer.cs

示例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;
 }
开发者ID:vsrz,项目名称:desbot_vsrz,代码行数:11,代码来源:Warn.cs

示例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( "_" ) );
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:13,代码来源:AliasFixture.cs

示例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);
        }
开发者ID:signumsoftware,项目名称:framework,代码行数:13,代码来源:Schema.Expressions.cs

示例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));
        }
开发者ID:jsakamoto,项目名称:bjd5,代码行数:15,代码来源:AliasTest.cs

示例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);
    }
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:15,代码来源:Class1.cs

示例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());
        }
开发者ID:rondoo,项目名称:framework,代码行数:16,代码来源:ColumnProjector.cs

示例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;
        }
开发者ID:hitesh97,项目名称:fluent-mongo,代码行数:16,代码来源:SelectExpression.cs


注:本文中的Alias类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。