• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Alias类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Alias的典型用法代码示例。如果您正苦于以下问题:C# Alias类的具体用法?C# Alias怎么用?C# Alias使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Alias类属于命名空间,在下文中一共展示了Alias类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: NewMessage

        public static void NewMessage(CSSDataContext db, string subject, 
            string message, Alias sender, Login recipient, DateTime sendDate)
        {
            db.PersonalMessages.InsertOnSubmit(new PersonalMessage()
            {
                Subject         = subject,
                Message         = message,
                SenderAliasId   = sender.Id,
                LoginId         = recipient.Id,
                DateCreated     = DateTime.Now,
                DateExpires     = DateTime.Now.AddYears(1), //Leaving at one year until discussion
                DateToSend      = sendDate,
                DateViewed      = null
            });

            db.SubmitChanges();
        }
开发者ID:LordBlacksun,项目名称:Allegiance-Community-Security-System,代码行数:17,代码来源:PersonalMessage.cs


示例17: GenerateBindings

        internal ReadOnlyCollection<FieldBinding> GenerateBindings(Alias tableAlias, QueryBinder binder, Expression id)
        {
            List<FieldBinding> result = new List<FieldBinding>();

           result.Add(new FieldBinding(Table.fiId, id));

            foreach (var ef in this.Fields.Values)
            {
                var fi = ef.FieldInfo;

                if (!ReflectionTools.FieldEquals(fi, fiId))
                    result.Add(new FieldBinding(fi, ef.Field.GetExpression(tableAlias, binder, id)));
            }


            return result.ToReadOnly();
        }
开发者ID:signumsoftware,项目名称:framework,代码行数:17,代码来源:Schema.Expressions.cs


示例18: EntityExpression

        public EntityExpression(Type type, Expression externalId, Alias tableAlias, IEnumerable<FieldBinding> bindings, IEnumerable<MixinEntityExpression> mixins, bool avoidExpandOnRetrieving)
            : base(DbExpressionType.Entity, type)
        {
            if (type == null) 
                throw new ArgumentNullException("type");

            if (!type.IsIdentifiableEntity())
                throw new ArgumentException("type");
            
            if (externalId == null) 
                throw new ArgumentNullException("externalId");
            
            this.Table = Schema.Current.Table(type);
            this.ExternalId = externalId;

            this.TableAlias = tableAlias;
            this.Bindings = bindings.ToReadOnly();
            this.Mixins = mixins.ToReadOnly();

            this.AvoidExpandOnRetrieving = avoidExpandOnRetrieving;
        }
开发者ID:nuub666,项目名称:framework,代码行数:21,代码来源:DbExpressions.Signum.cs


示例19: Hotkeys

 public Hotkeys(MainWindow parentwindow, ProgramSettings settings)
 {
     programSettings = settings;
     parent = parentwindow;
     InitializeComponent();
     rightClickGesture.MouseAction = MouseAction.RightClick;
     MouseBinding rightClickBinding = new MouseBinding();
     RoutedCommand rightClickCmd = new RoutedCommand();
     rightClickBinding.Gesture = rightClickGesture;
     rightClickBinding.Command = rightClickCmd;
     CommandBinding rightClickCmdBinding = new CommandBinding();
     rightClickCmdBinding.Command = rightClickCmd;
     rightClickCmdBinding.Executed += Button_RightClick;
     Uri uri = new Uri("pack://application:,,,/B_32x32.ico", UriKind.RelativeOrAbsolute);
     this.Icon = BitmapFrame.Create(uri);
     for (int i = 0; i < programSettings.NumHotKeys; i++)
     {
         Button btn = new Button();
         btn.Name = "btn" + i.ToString();
         btn.Click += Button_Click;
         btn.Width = 56;
         btn.InputBindings.Add(rightClickBinding);
         btn.CommandBindings.Add(rightClickCmdBinding);
         pnlButtons.Children.Add(btn);
         if (programSettings.HotkeyCommands.Count <= i)
         {
             Alias alias = new Alias();
             alias.Keyword = "(None)";
             btn.Content = "(none)";
             alias.Expansion = String.Empty;
             programSettings.HotkeyCommands.Add(alias);
         }
         else
         {
             btn.Content = programSettings.HotkeyCommands[i].Keyword;
         }
     }
 }
开发者ID:carriercomm,项目名称:ModernMUD,代码行数:38,代码来源:Hotkeys.xaml.cs


示例20: CreateAlias

 public Alias CreateAlias(SecureString secretPhrase, string alias, string uri, string fee, string deadline, ref string err)
 {
     Alias nxtAlias = new Alias();
     var client = new WebClient
     {
         Encoding = Encoding.UTF8
     };
     try
     {
         var rawData = client.DownloadString(_path + "/nxt?requestType=assignAlias&secretPhrase=" +
             HttpUtility.UrlEncode(ConvertToUnsecureString(secretPhrase)) + "&alias=" +
             HttpUtility.UrlEncode(alias) + "&uri=" +
             HttpUtility.UrlEncode(uri) + "&fee=" +
             HttpUtility.UrlEncode(fee) + "&deadline=" +
             HttpUtility.UrlEncode(deadline));
         nxtAlias = JsonConvert.DeserializeObject<Alias>(rawData);
     }
     catch (Exception e)
     {
         err = e.Message;
     }
     return nxtAlias;
 }
开发者ID:BaiMangal,项目名称:nxtManager,代码行数:23,代码来源:NXTApi.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AliasSymbol类代码示例发布时间:2022-05-24
下一篇:
C# Algorithm类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap