content stringlengths 5 1.04M | avg_line_length float64 1.75 12.9k | max_line_length int64 2 244k | alphanum_fraction float64 0 0.98 | licenses list | repository_name stringlengths 7 92 | path stringlengths 3 249 | size int64 5 1.04M | lang stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|
using Basket.API.Entities;
using System.Threading.Tasks;
namespace Basket.API.Respositories
{
public interface IBasketRepository
{
Task<ShoppingCart> GetBasket(string userName);
Task<ShoppingCart> UpdateBasket(ShoppingCart basket);
Task DeleteBasket(string userName);
}
}
| 23.846154 | 61 | 0.725806 | [
"MIT"
] | kwler123/AspNetMicroservices | src/Services/Basket/Basket.API/Respositories/IBasketRepository.cs | 312 | C# |
/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the ssm-2014-11-06.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.SimpleSystemsManagement.Model
{
/// <summary>
/// Container for the parameters to the ListResourceDataSync operation.
/// Lists your resource data sync configurations. Includes information about the last
/// time a sync attempted to start, the last sync status, and the last time a sync successfully
/// completed.
///
///
/// <para>
/// The number of sync configurations might be too large to return using a single call
/// to <code>ListResourceDataSync</code>. You can limit the number of sync configurations
/// returned by using the <code>MaxResults</code> parameter. To determine whether there
/// are more sync configurations to list, check the value of <code>NextToken</code> in
/// the output. If there are more sync configurations to list, you can request them by
/// specifying the <code>NextToken</code> returned in the call to the parameter of a subsequent
/// call.
/// </para>
/// </summary>
public partial class ListResourceDataSyncRequest : AmazonSimpleSystemsManagementRequest
{
private int? _maxResults;
private string _nextToken;
/// <summary>
/// Gets and sets the property MaxResults.
/// <para>
/// The maximum number of items to return for this call. The call also returns a token
/// that you can specify in a subsequent call to get the next set of results.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=50)]
public int MaxResults
{
get { return this._maxResults.GetValueOrDefault(); }
set { this._maxResults = value; }
}
// Check to see if MaxResults property is set
internal bool IsSetMaxResults()
{
return this._maxResults.HasValue;
}
/// <summary>
/// Gets and sets the property NextToken.
/// <para>
/// A token to start the list. Use this token to get the next set of results.
/// </para>
/// </summary>
public string NextToken
{
get { return this._nextToken; }
set { this._nextToken = value; }
}
// Check to see if NextToken property is set
internal bool IsSetNextToken()
{
return this._nextToken != null;
}
}
} | 35.582418 | 101 | 0.646387 | [
"Apache-2.0"
] | FoxBearBear/aws-sdk-net | sdk/src/Services/SimpleSystemsManagement/Generated/Model/ListResourceDataSyncRequest.cs | 3,238 | C# |
using Microsoft.Extensions.Configuration;
namespace DeckHub.Shows.Services
{
public class IdentityPaths : IIdentityPaths
{
private readonly string _prefix;
public IdentityPaths(IConfiguration configuration)
{
_prefix = configuration["Runtime:IdentityPathPrefix"];
}
public string Login => Adjust("/identity/Account/Login");
public string Logout => Adjust("/identity/Account/Logout");
public string Manage => Adjust("/identity/Account/Manage");
private string Adjust(string path)
{
return string.IsNullOrWhiteSpace(_prefix)
? path
: "/" + string.Join('/', _prefix.Trim('/'), path.Trim('/'));
}
}
} | 30.92 | 77 | 0.588616 | [
"MIT"
] | DeckHubApp/Shows | src/DeckHub.Shows/Services/IdentityPaths.cs | 775 | C# |
// GraphView
//
// Copyright (c) 2015 Microsoft Corporation
//
// All rights reserved.
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using GraphView.GraphViewDBPortal;
using Microsoft.SqlServer.TransactSql.ScriptDom;
namespace GraphView
{
[Serializable]
public partial class WMultiPartIdentifier : WSqlFragment, ISerializable
{
public IList<Identifier> Identifiers { get; set; }
public WMultiPartIdentifier(params Identifier[] identifiers)
{
Identifiers = identifiers.ToList();
}
public Identifier this[int index]
{
get { return Identifiers[index]; }
set { Identifiers[index] = value; }
}
public int Count
{
get { return Identifiers.Count; }
}
internal override bool OneLine()
{
return true;
}
internal override string ToString(string indent)
{
var sb = new StringBuilder(16);
for (var i = 0; i < Identifiers.Count; i++)
{
if (i > 0)
{
sb.Append('.');
}
sb.Append(Identifiers[i].Value);
}
return sb.ToString();
}
internal override string ToString(string indent, bool useSquareBracket)
{
var sb = new StringBuilder(16);
for (var i = 0; i < Identifiers.Count; i++)
{
if (i > 0)
{
sb.Append('.');
}
sb.Append("[" + Identifiers[i].Value + "]");
}
return sb.ToString();
}
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
GraphViewSerializer.SerializeList(info, "Identifiers", this.Identifiers.ToList());
}
protected WMultiPartIdentifier(SerializationInfo info, StreamingContext context)
{
this.Identifiers = GraphViewSerializer.DeserializeList<Identifier>(info, "Identifiers");
}
}
public partial class WSchemaObjectName : WMultiPartIdentifier
{
private const int ServerModifier = 4;
private const int DatabaseModifier = 3;
private const int SchemaModifier = 2;
private const int BaseModifier = 1;
public WSchemaObjectName(params Identifier[] identifiers)
{
Identifiers = identifiers;
}
public virtual Identifier ServerIdentifier
{
get { return ChooseIdentifier(ServerModifier); }
}
public virtual Identifier DatabaseIdentifier
{
get { return ChooseIdentifier(DatabaseModifier); }
}
public virtual Identifier SchemaIdentifier
{
get { return ChooseIdentifier(SchemaModifier); }
}
public virtual Identifier BaseIdentifier
{
get { return ChooseIdentifier(BaseModifier); }
}
protected Identifier ChooseIdentifier(int modifier)
{
var index = Identifiers.Count - modifier;
return index < 0 ? null : Identifiers[index];
}
}
}
| 31.351724 | 101 | 0.592829 | [
"MIT"
] | GerHobbelt/GraphView | GraphView/TSQL Syntax Tree/WSchemaObjectName.cs | 4,548 | C# |
#region header
// --------------------------------------------------------------------------------------------------------------------
// <copyright company="Robert Vandehey" file="ParsingException.cs">
// MIT License
//
// Copyright(c) 2020 Robert Vandehey
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
#endregion
using System;
namespace SynchroFeed.Library.Exceptions
{
public class ParsingException : Exception
{
public ParsingException()
{
}
public ParsingException(string message)
: base(message)
{
}
public ParsingException(string message, Exception inner)
: base(message, inner)
{
}
}
} | 38.265306 | 119 | 0.620267 | [
"MIT"
] | SynchroFeed/SynchroFeed | src/SynchroFeed.Library/Exceptions/ParsingException.cs | 1,877 | C# |
#region License
// Copyright 2004-2012 John Jeffery <john@jeffery.id.au>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion
using System.Data;
namespace Cesto.Data
{
/// <summary>
/// SQL command that is not strongly typed.
/// </summary>
public class SqlQuery : SqlQueryBase
{
public SqlQuery() : this(null)
{
}
public SqlQuery(IDbCommand cmd) : base(cmd)
{
}
public int ExecuteNonQuery()
{
CheckCommand();
PopulateCommand(Command);
return CommandExecuteNonQuery(Command);
}
public IDataReader ExecuteReader()
{
CheckCommand();
PopulateCommand(Command);
return DecorateDataReader(CommandExecuteReader(Command));
}
/// <summary>
/// Allows the derived class to customise how the command is executed
/// </summary>
/// <param name = "cmd">Command populated with command text and parameters</param>
/// <returns>Number of rows affected by the command</returns>
protected virtual int CommandExecuteNonQuery(IDbCommand cmd)
{
return cmd.ExecuteNonQuery();
}
}
} | 25.933333 | 84 | 0.712725 | [
"Apache-2.0"
] | jjeffery/Cesto | src/Cesto.Data/Data/SqlQuery.cs | 1,558 | C# |
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="NetworkingPeer.cs" company="Exit Games GmbH">
// Part of: Photon Unity Networking (PUN)
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
using System.Linq;
using ExitGames.Client.Photon;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using Hashtable = ExitGames.Client.Photon.Hashtable;
/// <summary>
/// Implements Photon LoadBalancing used in PUN.
/// This class is used internally by PhotonNetwork and not intended as public API.
/// </summary>
internal class NetworkingPeer : LoadbalancingPeer, IPhotonPeerListener
{
/// <summary>Combination of GameVersion+"_"+PunVersion. Separates players per app by version.</summary>
protected internal string mAppVersionPun
{
get { return string.Format("{0}_{1}", PhotonNetwork.gameVersion, PhotonNetwork.versionPUN); }
}
/// <summary>Contains the AppId for the Photon Cloud (ignored by Photon Servers).</summary>
protected internal string mAppId;
/// <summary>
/// A user's authentication values used during connect for Custom Authentication with Photon (and a custom service/community).
/// Set these before calling Connect if you want custom authentication.
/// </summary>
public AuthenticationValues CustomAuthenticationValues { get; set; }
/// <summary>Name Server port per protocol (the UDP port is different than TCP, etc).</summary>
private static readonly Dictionary<ConnectionProtocol, int> ProtocolToNameServerPort = new Dictionary<ConnectionProtocol, int>() { { ConnectionProtocol.Udp, 5058 }, { ConnectionProtocol.Tcp, 4533 }, { ConnectionProtocol.WebSocket, 9093 }, { ConnectionProtocol.WebSocketSecure, 19093 } }; //, { ConnectionProtocol.RHttp, 6063 } };
/// <summary>Name Server Host Name for Photon Cloud. Without port and without any prefix.</summary>
public const string NameServerHost = "ns.exitgames.com";
/// <summary>Name Server for HTTP connections to the Photon Cloud. Includes prefix and port.</summary>
public const string NameServerHttp = "http://ns.exitgamescloud.com:80/photon/n";
/// <summary>Name Server Address for Photon Cloud (based on current protocol). You can use the default values and usually won't have to set this value.</summary>
public string NameServerAddress { get { return this.GetNameServerAddress(); } }
public string MasterServerAddress { get; protected internal set; }
public string mGameserver { get; internal set; }
/// <summary>The server this client is currently connected or connecting to.</summary>
internal protected ServerConnection server { get; private set; }
public PeerState State { get; internal set; }
/// <summary>True if this client uses a NameServer to get the Master Server address.</summary>
public bool IsUsingNameServer { get; protected internal set; }
public bool IsInitialConnect = false;
/// <summary>Internally used to trigger OpAuthenticate when encryption was established after a connect.</summary>
private bool didAuthenticate;
/// <summary>Internally used to check if a "Secret" is available to use. Sent by Photon Cloud servers, it simplifies authentication when switching servers.</summary>
public bool IsAuthorizeSecretAvailable
{
get
{
return this.CustomAuthenticationValues != null && !String.IsNullOrEmpty(this.CustomAuthenticationValues.Token);
}
}
/// <summary>A list of region names for the Photon Cloud. Set by the result of OpGetRegions().</summary>
/// <remarks>Put a "case OperationCode.GetRegions:" into your OnOperationResponse method to notice when the result is available.</remarks>
public List<Region> AvailableRegions { get; protected internal set; }
/// <summary>The cloud region this client connects to. Set by ConnectToRegionMaster().</summary>
public CloudRegionCode CloudRegion { get; protected internal set; }
private bool requestLobbyStatistics
{
get { return PhotonNetwork.EnableLobbyStatistics && this.server == ServerConnection.MasterServer; }
}
protected internal List<TypedLobbyInfo> LobbyStatistics = new List<TypedLobbyInfo>();
public TypedLobby lobby { get; set; }
public bool insideLobby = false;
public Dictionary<string, RoomInfo> mGameList = new Dictionary<string, RoomInfo>();
public RoomInfo[] mGameListCopy = new RoomInfo[0];
/// <summary>Stat value: Count of players on Master (looking for rooms)</summary>
public int mPlayersOnMasterCount { get; internal set; }
/// <summary>Stat value: Count of Rooms</summary>
public int mGameCount { get; internal set; }
/// <summary>Stat value: Count of Players in rooms</summary>
public int mPlayersInRoomsCount { get; internal set; }
/// <summary>Internal flag to know if the client currently fetches a friend list.</summary>
private bool isFetchingFriends;
/// <summary>Contains the list of names of friends to look up their state on the server.</summary>
private string[] friendListRequested;
/// <summary>
/// Age of friend list info (in milliseconds). It's 0 until a friend list is fetched.
/// </summary>
protected internal int FriendsListAge { get { return (this.isFetchingFriends || this.friendListTimestamp == 0) ? 0 : Environment.TickCount - this.friendListTimestamp; } }
private int friendListTimestamp;
private string playername = "";
public string PlayerName
{
get
{
return this.playername;
}
set
{
if (string.IsNullOrEmpty(value) || value.Equals(this.playername))
{
return;
}
if (this.mLocalActor != null)
{
this.mLocalActor.name = value;
}
this.playername = value;
if (this.CurrentGame != null)
{
// Only when in a room
this.SendPlayerName();
}
}
}
// "public" access to the current game - is null unless a room is joined on a gameserver
// isLocalClientInside becomes true when op join result is positive on GameServer
private bool mPlayernameHasToBeUpdated;
private EnterRoomParams enterRoomParamsCache;
private JoinType mLastJoinType;
public Room CurrentGame
{
get
{
if (this.mCurrentGame != null && this.mCurrentGame.isLocalClientInside)
{
return this.mCurrentGame;
}
return null;
}
private set { this.mCurrentGame = value; }
}
private Room mCurrentGame;
public Dictionary<int, PhotonPlayer> mActors = new Dictionary<int, PhotonPlayer>();
public PhotonPlayer[] mOtherPlayerListCopy = new PhotonPlayer[0];
public PhotonPlayer[] mPlayerListCopy = new PhotonPlayer[0];
public PhotonPlayer mLocalActor { get; internal set; }
public int mMasterClientId
{
get
{
if (PhotonNetwork.offlineMode) return this.mLocalActor.ID;
return (this.CurrentGame == null) ? 0 : this.CurrentGame.masterClientId;
}
private set
{
if (this.CurrentGame != null)
{
this.CurrentGame.masterClientId = value;
}
}
}
public bool hasSwitchedMC = false;
private HashSet<int> allowedReceivingGroups = new HashSet<int>();
private HashSet<int> blockSendingGroups = new HashSet<int>();
internal protected Dictionary<int, PhotonView> photonViewList = new Dictionary<int, PhotonView>(); //TODO: make private again
private readonly Dictionary<int, Hashtable> dataPerGroupReliable = new Dictionary<int, Hashtable>(); // only used in RunViewUpdate()
private readonly Dictionary<int, Hashtable> dataPerGroupUnreliable = new Dictionary<int, Hashtable>(); // only used in RunViewUpdate()
internal protected short currentLevelPrefix = 0;
/// <summary>Internally used to flag if the message queue was disabled by a "scene sync" situation (to re-enable it).</summary>
internal protected bool loadingLevelAndPausedNetwork = false;
/// <summary>For automatic scene syncing, the loaded scene is put into a room property. This is the name of said prop.</summary>
internal protected const string CurrentSceneProperty = "curScn";
public static bool UsePrefabCache = true;
internal IPunPrefabPool ObjectPool;
public static Dictionary<string, GameObject> PrefabCache = new Dictionary<string, GameObject>();
private Dictionary<Type, List<MethodInfo>> monoRPCMethodsCache = new Dictionary<Type, List<MethodInfo>>();
private readonly Dictionary<string, int> rpcShortcuts; // lookup "table" for the index (shortcut) of an RPC name
// TODO: CAS must be implemented for OfflineMode
public NetworkingPeer(string playername, ConnectionProtocol connectionProtocol) : base(connectionProtocol)
{
this.Listener = this;
#if !UNITY_EDITOR && (UNITY_WINRT)
// this automatically uses a separate assembly-file with Win8-style Socket usage (not possible in Editor)
Debug.LogWarning("Using PingWindowsStore");
PhotonHandler.PingImplementation = typeof(PingWindowsStore); // but for ping, we have to set the implementation explicitly to Win 8 Store/Phone
#endif
#pragma warning disable 0162 // the library variant defines if we should use PUN's SocketUdp variant (at all)
if (PhotonPeer.NoSocket)
{
#if !UNITY_EDITOR && (UNITY_PS3 || UNITY_ANDROID)
Debug.Log("Using class SocketUdpNativeDynamic");
this.SocketImplementation = typeof(SocketUdpNativeDynamic);
PhotonHandler.PingImplementation = typeof(PingNativeDynamic);
#elif !UNITY_EDITOR && UNITY_IPHONE
Debug.Log("Using class SocketUdpNativeStatic");
this.SocketImplementation = typeof(SocketUdpNativeStatic);
PhotonHandler.PingImplementation = typeof(PingNativeStatic);
#elif !UNITY_EDITOR && (UNITY_WINRT)
// this automatically uses a separate assembly-file with Win8-style Socket usage (not possible in Editor)
#else
this.SocketImplementation = typeof(SocketUdp);
PhotonHandler.PingImplementation = typeof(PingMonoEditor);
#endif
if (this.SocketImplementation == null)
{
Debug.Log("No socket implementation set for 'NoSocket' assembly. Please contact Exit Games.");
}
}
#pragma warning restore 0162
#if UNITY_WEBGL
if (connectionProtocol == ConnectionProtocol.WebSocket || connectionProtocol == ConnectionProtocol.WebSocketSecure)
{
Debug.Log("Using SocketWebTcp");
this.SocketImplementation = typeof(SocketWebTcp);
}
#endif
if (PhotonHandler.PingImplementation == null)
{
PhotonHandler.PingImplementation = typeof(PingMono);
}
this.LimitOfUnreliableCommands = 40;
this.lobby = TypedLobby.Default;
this.PlayerName = playername;
this.mLocalActor = new PhotonPlayer(true, -1, this.playername);
this.AddNewPlayer(this.mLocalActor.ID, this.mLocalActor);
// RPC shortcut lookup creation (from list of RPCs, which is updated by Editor scripts)
rpcShortcuts = new Dictionary<string, int>(PhotonNetwork.PhotonServerSettings.RpcList.Count);
for (int index = 0; index < PhotonNetwork.PhotonServerSettings.RpcList.Count; index++)
{
var name = PhotonNetwork.PhotonServerSettings.RpcList[index];
rpcShortcuts[name] = index;
}
this.State = global::PeerState.PeerCreated;
}
/// <summary>
/// Gets the NameServer Address (with prefix and port), based on the set protocol (this.UsedProtocol).
/// </summary>
/// <returns>NameServer Address (with prefix and port).</returns>
private string GetNameServerAddress()
{
#if RHTTP
if (currentProtocol == ConnectionProtocol.RHttp)
{
return NameServerHttp;
}
#endif
ConnectionProtocol currentProtocol = this.UsedProtocol;
int protocolPort = 0;
ProtocolToNameServerPort.TryGetValue(currentProtocol, out protocolPort);
string protocolPrefix = string.Empty;
if (currentProtocol == ConnectionProtocol.WebSocket)
{
protocolPrefix = "ws://";
}
else if (currentProtocol == ConnectionProtocol.WebSocketSecure)
{
protocolPrefix = "wss://";
}
return string.Format("{0}{1}:{2}", protocolPrefix, NameServerHost, protocolPort);
}
#region Operations and Connection Methods
public override bool Connect(string serverAddress, string applicationName)
{
Debug.LogError("Avoid using this directly. Thanks.");
return false;
}
public bool Connect(string serverAddress, ServerConnection type)
{
if (PhotonHandler.AppQuits)
{
Debug.LogWarning("Ignoring Connect() because app gets closed. If this is an error, check PhotonHandler.AppQuits.");
return false;
}
if (PhotonNetwork.connectionStateDetailed == global::PeerState.Disconnecting)
{
Debug.LogError("Connect() failed. Can't connect while disconnecting (still). Current state: " + PhotonNetwork.connectionStateDetailed);
return false;
}
// connect might fail, if the DNS name can't be resolved or if no network connection is available
bool connecting = base.Connect(serverAddress, "");
if (connecting)
{
switch (type)
{
case ServerConnection.NameServer:
State = global::PeerState.ConnectingToNameServer;
break;
case ServerConnection.MasterServer:
State = global::PeerState.ConnectingToMasterserver;
break;
case ServerConnection.GameServer:
State = global::PeerState.ConnectingToGameserver;
break;
}
}
return connecting;
}
/// <summary>
/// Connects to the NameServer for Photon Cloud, where a region and server list can be obtained.
/// </summary>
/// <see cref="OpGetRegions"/>
/// <returns>If the workflow was started or failed right away.</returns>
public bool ConnectToNameServer()
{
if (PhotonHandler.AppQuits)
{
Debug.LogWarning("Ignoring Connect() because app gets closed. If this is an error, check PhotonHandler.AppQuits.");
return false;
}
IsUsingNameServer = true;
this.CloudRegion = CloudRegionCode.none;
if (this.State == global::PeerState.ConnectedToNameServer)
{
return true;
}
string address = this.NameServerAddress;
if (!base.Connect(address, "ns"))
{
return false;
}
this.State = global::PeerState.ConnectingToNameServer;
return true;
}
/// <summary>
/// Connects you to a specific region's Master Server, using the Name Server to find the IP.
/// </summary>
/// <returns>If the operation could be sent. If false, no operation was sent.</returns>
public bool ConnectToRegionMaster(CloudRegionCode region)
{
if (PhotonHandler.AppQuits)
{
Debug.LogWarning("Ignoring Connect() because app gets closed. If this is an error, check PhotonHandler.AppQuits.");
return false;
}
IsUsingNameServer = true;
this.CloudRegion = region;
if (this.State == global::PeerState.ConnectedToNameServer)
{
AuthenticationValues auth = this.CustomAuthenticationValues ?? new AuthenticationValues() { UserId = this.PlayerName };
return this.OpAuthenticate(this.mAppId, this.mAppVersionPun, auth, region.ToString(), requestLobbyStatistics);
}
string address = this.NameServerAddress;
if (!base.Connect(address, "ns"))
{
return false;
}
this.State = global::PeerState.ConnectingToNameServer;
return true;
}
/// <summary>
/// While on the NameServer, this gets you the list of regional servers (short names and their IPs to ping them).
/// </summary>
/// <returns>If the operation could be sent. If false, no operation was sent (e.g. while not connected to the NameServer).</returns>
public bool GetRegions()
{
if (this.server != ServerConnection.NameServer)
{
return false;
}
bool sent = this.OpGetRegions(this.mAppId);
if (sent)
{
this.AvailableRegions = null;
}
return sent;
}
/// <summary>
/// Complete disconnect from photon (and the open master OR game server)
/// </summary>
public override void Disconnect()
{
if (this.PeerState == PeerStateValue.Disconnected)
{
if (!PhotonHandler.AppQuits)
{
Debug.LogWarning(string.Format("Can't execute Disconnect() while not connected. Nothing changed. State: {0}", this.State));
}
return;
}
this.State = global::PeerState.Disconnecting;
base.Disconnect();
//this.LeftRoomCleanup();
//this.LeftLobbyCleanup();
}
/// <summary>
/// Internally used only. Triggers OnStateChange with "Disconnect" in next dispatch which is the signal to re-connect (if at all).
/// </summary>
private void DisconnectToReconnect()
{
switch (this.server)
{
case ServerConnection.NameServer:
this.State = global::PeerState.DisconnectingFromNameServer;
base.Disconnect();
break;
case ServerConnection.MasterServer:
this.State = global::PeerState.DisconnectingFromMasterserver;
base.Disconnect();
//LeftLobbyCleanup();
break;
case ServerConnection.GameServer:
this.State = global::PeerState.DisconnectingFromGameserver;
base.Disconnect();
//this.LeftRoomCleanup();
break;
}
}
/// <summary>
/// Called at disconnect/leavelobby etc. This CAN also be called when we are not in a lobby (e.g. disconnect from room)
/// </summary>
/// <remarks>Calls callback method OnLeftLobby if this client was in a lobby initially. Clears the lobby's game lists.</remarks>
private void LeftLobbyCleanup()
{
this.mGameList = new Dictionary<string, RoomInfo>();
this.mGameListCopy = new RoomInfo[0];
if (insideLobby)
{
this.insideLobby = false;
SendMonoMessage(PhotonNetworkingMessage.OnLeftLobby);
}
}
/// <summary>
/// Called when "this client" left a room to clean up.
/// </summary>
private void LeftRoomCleanup()
{
bool wasInRoom = this.CurrentGame != null;
// when leaving a room, we clean up depending on that room's settings.
bool autoCleanupSettingOfRoom = (this.CurrentGame != null) ? this.CurrentGame.autoCleanUp : PhotonNetwork.autoCleanUpPlayerObjects;
this.hasSwitchedMC = false;
this.CurrentGame = null;
this.mActors = new Dictionary<int, PhotonPlayer>();
this.mPlayerListCopy = new PhotonPlayer[0];
this.mOtherPlayerListCopy = new PhotonPlayer[0];
this.allowedReceivingGroups = new HashSet<int>();
this.blockSendingGroups = new HashSet<int>();
this.mGameList = new Dictionary<string, RoomInfo>();
this.mGameListCopy = new RoomInfo[0];
this.isFetchingFriends = false;
this.ChangeLocalID(-1);
// Cleanup all network objects (all spawned PhotonViews, local and remote)
if (autoCleanupSettingOfRoom)
{
this.LocalCleanupAnythingInstantiated(true);
PhotonNetwork.manuallyAllocatedViewIds = new List<int>(); // filled and easier to replace completely
}
if (wasInRoom)
{
SendMonoMessage(PhotonNetworkingMessage.OnLeftRoom);
}
}
/// <summary>
/// Cleans up anything that was instantiated in-game (not loaded with the scene).
/// </summary>
protected internal void LocalCleanupAnythingInstantiated(bool destroyInstantiatedGameObjects)
{
if (tempInstantiationData.Count > 0)
{
Debug.LogWarning("It seems some instantiation is not completed, as instantiation data is used. You should make sure instantiations are paused when calling this method. Cleaning now, despite this.");
}
// Destroy GO's (if we should)
if (destroyInstantiatedGameObjects)
{
// Fill list with Instantiated objects
HashSet<GameObject> instantiatedGos = new HashSet<GameObject>();
foreach (PhotonView view in this.photonViewList.Values)
{
if (view.isRuntimeInstantiated)
{
instantiatedGos.Add(view.gameObject); // HashSet keeps each object only once
}
}
foreach (GameObject go in instantiatedGos)
{
this.RemoveInstantiatedGO(go, true);
}
}
// photonViewList is cleared of anything instantiated (so scene items are left inside)
// any other lists can be
this.tempInstantiationData.Clear(); // should be empty but to be safe we clear (no new list needed)
PhotonNetwork.lastUsedViewSubId = 0;
PhotonNetwork.lastUsedViewSubIdStatic = 0;
}
// gameID can be null (optional). The server assigns a unique name if no name is set
// joins a room and sets your current username as custom actorproperty (will broadcast that)
#endregion
#region Helpers
private void ReadoutProperties(Hashtable gameProperties, Hashtable pActorProperties, int targetActorNr)
{
// Debug.LogWarning("ReadoutProperties gameProperties: " + gameProperties.ToStringFull() + " pActorProperties: " + pActorProperties.ToStringFull() + " targetActorNr: " + targetActorNr);
// read per-player properties (or those of one target player) and cache those locally
if (pActorProperties != null && pActorProperties.Count > 0)
{
if (targetActorNr > 0)
{
// we have a single entry in the pActorProperties with one
// user's name
// targets MUST exist before you set properties
PhotonPlayer target = this.GetPlayerWithId(targetActorNr);
if (target != null)
{
Hashtable props = this.GetActorPropertiesForActorNr(pActorProperties, targetActorNr);
target.InternalCacheProperties(props);
SendMonoMessage(PhotonNetworkingMessage.OnPhotonPlayerPropertiesChanged, target, props);
}
}
else
{
// in this case, we've got a key-value pair per actor (each
// value is a hashtable with the actor's properties then)
int actorNr;
Hashtable props;
string newName;
PhotonPlayer target;
foreach (object key in pActorProperties.Keys)
{
actorNr = (int)key;
props = (Hashtable)pActorProperties[key];
newName = (string)props[ActorProperties.PlayerName];
target = this.GetPlayerWithId(actorNr);
if (target == null)
{
target = new PhotonPlayer(false, actorNr, newName);
this.AddNewPlayer(actorNr, target);
}
target.InternalCacheProperties(props);
SendMonoMessage(PhotonNetworkingMessage.OnPhotonPlayerPropertiesChanged, target, props);
}
}
}
// read game properties and cache them locally
if (this.CurrentGame != null && gameProperties != null)
{
this.CurrentGame.InternalCacheProperties(gameProperties);
SendMonoMessage(PhotonNetworkingMessage.OnPhotonCustomRoomPropertiesChanged, gameProperties);
if (PhotonNetwork.automaticallySyncScene)
{
this.LoadLevelIfSynced(); // will load new scene if sceneName was changed
}
}
}
private void AddNewPlayer(int ID, PhotonPlayer player)
{
if (!this.mActors.ContainsKey(ID))
{
this.mActors[ID] = player;
RebuildPlayerListCopies();
}
else
{
Debug.LogError("Adding player twice: " + ID);
}
}
void RemovePlayer(int ID, PhotonPlayer player)
{
this.mActors.Remove(ID);
if (!player.isLocal)
{
RebuildPlayerListCopies();
}
}
void RebuildPlayerListCopies()
{
this.mPlayerListCopy = new PhotonPlayer[this.mActors.Count];
this.mActors.Values.CopyTo(this.mPlayerListCopy, 0);
List<PhotonPlayer> otherP = new List<PhotonPlayer>();
foreach (PhotonPlayer player in this.mPlayerListCopy)
{
if (!player.isLocal)
{
otherP.Add(player);
}
}
this.mOtherPlayerListCopy = otherP.ToArray();
}
/// <summary>
/// Resets the PhotonView "lastOnSerializeDataSent" so that "OnReliable" synched PhotonViews send a complete state to new clients (if the state doesnt change, no messages would be send otherwise!).
/// Note that due to this reset, ALL other players will receive the full OnSerialize.
/// </summary>
private void ResetPhotonViewsOnSerialize()
{
foreach (PhotonView photonView in this.photonViewList.Values)
{
photonView.lastOnSerializeDataSent = null;
}
}
/// <summary>
/// Called when the event Leave (of some other player) arrived.
/// Cleans game objects, views locally. The master will also clean the
/// </summary>
/// <param name="actorID">ID of player who left.</param>
private void HandleEventLeave(int actorID, EventData evLeave)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
Debug.Log("HandleEventLeave for player ID: " + actorID);
// actorNr is fetched out of event above
if (actorID < 0 || !this.mActors.ContainsKey(actorID))
{
Debug.LogError(String.Format("Received event Leave for unknown player ID: {0}", actorID));
return;
}
PhotonPlayer player = this.GetPlayerWithId(actorID);
if (player == null)
{
Debug.LogError("HandleEventLeave for player ID: " + actorID + " has no PhotonPlayer!");
}
// having a new master before calling destroy for the leaving player is important!
// so we elect a new masterclient and ignore the leaving player (who is still in playerlists).
// note: there is/was a server-side-error which sent 0 as new master instead of skipping the key/value. below is a check for 0 due to that
if (evLeave.Parameters.ContainsKey(ParameterCode.MasterClientId))
{
int newMaster = (int) evLeave[ParameterCode.MasterClientId];
if (newMaster != 0)
{
this.mMasterClientId = (int)evLeave[ParameterCode.MasterClientId];
this.UpdateMasterClient();
}
}
else if (!this.CurrentGame.serverSideMasterClient)
{
this.CheckMasterClient(actorID);
}
// destroy objects & buffered messages
if (this.CurrentGame != null && this.CurrentGame.autoCleanUp)
{
this.DestroyPlayerObjects(actorID, true);
}
RemovePlayer(actorID, player);
// finally, send notification (the playerList and masterclient are now updated)
SendMonoMessage(PhotonNetworkingMessage.OnPhotonPlayerDisconnected, player);
}
/// <summary>Picks the new master client from player list, if the current Master is leaving (leavingPlayerId) or if no master was assigned so far.</summary>
/// <param name="leavingPlayerId">
/// The ignored player is the one who's leaving and should not become master (again). Pass -1 to select any player from the list.
/// </param>
private void CheckMasterClient(int leavingPlayerId)
{
bool currentMasterIsLeaving = this.mMasterClientId == leavingPlayerId;
bool someoneIsLeaving = leavingPlayerId > 0;
// return early if SOME player (leavingId > 0) is leaving AND it's NOT the current master
if (someoneIsLeaving && !currentMasterIsLeaving)
{
return;
}
// picking the player with lowest ID (longest in game).
int lowestActorNumber;
if (this.mActors.Count <= 1)
{
lowestActorNumber = this.mLocalActor.ID;
}
else
{
// keys in mActors are their actorNumbers
lowestActorNumber = Int32.MaxValue;
foreach (int key in this.mActors.Keys)
{
if (key < lowestActorNumber && key != leavingPlayerId)
{
lowestActorNumber = key;
}
}
}
this.mMasterClientId = lowestActorNumber;
// callback ONLY when the current master left
if (someoneIsLeaving)
{
SendMonoMessage(PhotonNetworkingMessage.OnMasterClientSwitched, this.GetPlayerWithId(lowestActorNumber));
}
}
/// <summary>Call when the server provides a MasterClientId (due to joining or the current MC leaving, etc).</summary>
internal protected void UpdateMasterClient()
{
SendMonoMessage(PhotonNetworkingMessage.OnMasterClientSwitched, PhotonNetwork.masterClient);
}
private static int ReturnLowestPlayerId(PhotonPlayer[] players, int playerIdToIgnore)
{
if (players == null || players.Length == 0)
{
return -1;
}
int lowestActorNumber = Int32.MaxValue;
for (int i = 0; i < players.Length; i++)
{
PhotonPlayer photonPlayer = players[i];
if (photonPlayer.ID == playerIdToIgnore)
{
continue;
}
if (photonPlayer.ID < lowestActorNumber)
{
lowestActorNumber = photonPlayer.ID;
}
}
return lowestActorNumber;
}
/// <summary>Fake-sets a new Master Client for this room via RaiseEvent.</summary>
/// <remarks>Does not affect RaiseEvent with target MasterClient but RPC().</remarks>
internal protected bool SetMasterClient(int playerId, bool sync)
{
bool masterReplaced = this.mMasterClientId != playerId;
if (!masterReplaced || !this.mActors.ContainsKey(playerId))
{
return false;
}
if (sync)
{
bool sent = this.OpRaiseEvent(PunEvent.AssignMaster, new Hashtable() { { (byte)1, playerId } }, true, null);
if (!sent)
{
return false;
}
}
this.hasSwitchedMC = true;
this.CurrentGame.masterClientId = playerId;
SendMonoMessage(PhotonNetworkingMessage.OnMasterClientSwitched, this.GetPlayerWithId(playerId)); // we only callback when an actual change is done
return true;
}
/// <summary>Uses a well-known property to set someone new as Master Client in room (requires "Server Side Master Client" feature).</summary>
public bool SetMasterClient(int nextMasterId)
{
Hashtable newProps = new Hashtable() { { GamePropertyKey.MasterClientId, nextMasterId } };
Hashtable prevProps = new Hashtable() { { GamePropertyKey.MasterClientId, this.mMasterClientId } };
return this.OpSetPropertiesOfRoom(newProps, expectedProperties: prevProps, webForward: false);
}
private Hashtable GetActorPropertiesForActorNr(Hashtable actorProperties, int actorNr)
{
if (actorProperties.ContainsKey(actorNr))
{
return (Hashtable)actorProperties[actorNr];
}
return actorProperties;
}
protected internal PhotonPlayer GetPlayerWithId(int number)
{
if (this.mActors == null) return null;
PhotonPlayer player = null;
this.mActors.TryGetValue(number, out player);
return player;
}
private void SendPlayerName()
{
if (this.State == global::PeerState.Joining)
{
// this means, the join on the gameServer is sent (with an outdated name). send the new when in game
this.mPlayernameHasToBeUpdated = true;
return;
}
if (this.mLocalActor != null)
{
this.mLocalActor.name = this.PlayerName;
Hashtable properties = new Hashtable();
properties[ActorProperties.PlayerName] = this.PlayerName;
if (this.mLocalActor.ID > 0)
{
this.OpSetPropertiesOfActor(this.mLocalActor.ID, properties, null);
this.mPlayernameHasToBeUpdated = false;
}
}
}
private void GameEnteredOnGameServer(OperationResponse operationResponse)
{
if (operationResponse.ReturnCode != 0)
{
switch (operationResponse.OperationCode)
{
case OperationCode.CreateGame:
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
{
Debug.Log("Create failed on GameServer. Changing back to MasterServer. Msg: " + operationResponse.DebugMessage);
}
SendMonoMessage(PhotonNetworkingMessage.OnPhotonCreateRoomFailed, operationResponse.ReturnCode, operationResponse.DebugMessage);
break;
case OperationCode.JoinGame:
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
{
Debug.Log("Join failed on GameServer. Changing back to MasterServer. Msg: " + operationResponse.DebugMessage);
if (operationResponse.ReturnCode == ErrorCode.GameDoesNotExist)
{
Debug.Log("Most likely the game became empty during the switch to GameServer.");
}
}
SendMonoMessage(PhotonNetworkingMessage.OnPhotonJoinRoomFailed, operationResponse.ReturnCode, operationResponse.DebugMessage);
break;
case OperationCode.JoinRandomGame:
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
{
Debug.Log("Join failed on GameServer. Changing back to MasterServer. Msg: " + operationResponse.DebugMessage);
if (operationResponse.ReturnCode == ErrorCode.GameDoesNotExist)
{
Debug.Log("Most likely the game became empty during the switch to GameServer.");
}
}
SendMonoMessage(PhotonNetworkingMessage.OnPhotonRandomJoinFailed, operationResponse.ReturnCode, operationResponse.DebugMessage);
break;
}
this.DisconnectToReconnect();
return;
}
Room current = new Room(enterRoomParamsCache.RoomName, null);
current.isLocalClientInside = true;
this.CurrentGame = current;
this.State = global::PeerState.Joined;
if (operationResponse.Parameters.ContainsKey(ParameterCode.ActorList))
{
int[] actorsInRoom = (int[])operationResponse.Parameters[ParameterCode.ActorList];
this.UpdatedActorList(actorsInRoom);
}
// the local player's actor-properties are not returned in join-result. add this player to the list
int localActorNr = (int)operationResponse[ParameterCode.ActorNr];
this.ChangeLocalID(localActorNr);
Hashtable actorProperties = (Hashtable)operationResponse[ParameterCode.PlayerProperties];
Hashtable gameProperties = (Hashtable)operationResponse[ParameterCode.GameProperties];
this.ReadoutProperties(gameProperties, actorProperties, 0);
if (!this.CurrentGame.serverSideMasterClient) this.CheckMasterClient(-1);
if (this.mPlayernameHasToBeUpdated)
{
this.SendPlayerName();
}
switch (operationResponse.OperationCode)
{
case OperationCode.CreateGame:
SendMonoMessage(PhotonNetworkingMessage.OnCreatedRoom);
break;
case OperationCode.JoinGame:
case OperationCode.JoinRandomGame:
// the mono message for this is sent at another place
break;
}
}
private Hashtable GetLocalActorProperties()
{
if (PhotonNetwork.player != null)
{
return PhotonNetwork.player.allProperties;
}
Hashtable actorProperties = new Hashtable();
actorProperties[ActorProperties.PlayerName] = this.PlayerName;
return actorProperties;
}
public void ChangeLocalID(int newID)
{
if (this.mLocalActor == null)
{
Debug.LogWarning(
string.Format(
"Local actor is null or not in mActors! mLocalActor: {0} mActors==null: {1} newID: {2}",
this.mLocalActor,
this.mActors == null,
newID));
}
if (this.mActors.ContainsKey(this.mLocalActor.ID))
{
this.mActors.Remove(this.mLocalActor.ID);
}
this.mLocalActor.InternalChangeLocalID(newID);
this.mActors[this.mLocalActor.ID] = this.mLocalActor;
this.RebuildPlayerListCopies();
}
#endregion
#region Operations
/// <summary>NetworkingPeer.OpCreateGame</summary>
public bool OpCreateGame(EnterRoomParams enterRoomParams)
{
bool onGameServer = this.server == ServerConnection.GameServer;
enterRoomParams.OnGameServer = onGameServer;
enterRoomParams.PlayerProperties = GetLocalActorProperties();
if (!onGameServer)
{
enterRoomParamsCache = enterRoomParams;
}
this.mLastJoinType = JoinType.CreateGame;
return base.OpCreateRoom(enterRoomParams);
}
/// <summary>NetworkingPeer.OpJoinRoom</summary>
public override bool OpJoinRoom(EnterRoomParams opParams)
{
bool onGameServer = this.server == ServerConnection.GameServer;
opParams.OnGameServer = onGameServer;
if (!onGameServer)
{
enterRoomParamsCache = opParams;
}
this.mLastJoinType = (opParams.CreateIfNotExists) ? JoinType.JoinOrCreateOnDemand : JoinType.JoinGame;
return base.OpJoinRoom(opParams);
}
/// <summary>NetworkingPeer.OpJoinRandomRoom</summary>
/// <remarks>this override just makes sure we have a mRoomToGetInto, even if it's blank (the properties provided in this method are filters. they are not set when we join the game)</remarks>
public override bool OpJoinRandomRoom(OpJoinRandomRoomParams opJoinRandomRoomParams)
{
enterRoomParamsCache = new EnterRoomParams(); // this is used when the client arrives on the GS and joins the room
enterRoomParamsCache.Lobby = opJoinRandomRoomParams.TypedLobby;
this.mLastJoinType = JoinType.JoinRandomGame;
return base.OpJoinRandomRoom(opJoinRandomRoomParams);
}
/// <summary>
/// Operation Leave will exit any current room.
/// </summary>
/// <remarks>
/// This also happens when you disconnect from the server.
/// Disconnect might be a step less if you don't want to create a new room on the same server.
/// </remarks>
/// <returns></returns>
public virtual bool OpLeave()
{
if (this.State != global::PeerState.Joined)
{
Debug.LogWarning("Not sending leave operation. State is not 'Joined': " + this.State);
return false;
}
return this.OpCustom((byte)OperationCode.Leave, null, true, 0);
}
public override bool OpRaiseEvent(byte eventCode, object customEventContent, bool sendReliable, RaiseEventOptions raiseEventOptions)
{
if (PhotonNetwork.offlineMode)
{
return false;
}
return base.OpRaiseEvent(eventCode, customEventContent, sendReliable, raiseEventOptions);
}
#endregion
#region Implementation of IPhotonPeerListener
public void DebugReturn(DebugLevel level, string message)
{
if (level == DebugLevel.ERROR)
{
Debug.LogError(message);
}
else if (level == DebugLevel.WARNING)
{
Debug.LogWarning(message);
}
else if (level == DebugLevel.INFO && PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
{
Debug.Log(message);
}
else if (level == DebugLevel.ALL && PhotonNetwork.logLevel == PhotonLogLevel.Full)
{
Debug.Log(message);
}
}
public void OnOperationResponse(OperationResponse operationResponse)
{
if (PhotonNetwork.networkingPeer.State == global::PeerState.Disconnecting)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
{
Debug.Log("OperationResponse ignored while disconnecting. Code: " + operationResponse.OperationCode);
}
return;
}
// extra logging for error debugging (helping developers with a bit of automated analysis)
if (operationResponse.ReturnCode == 0)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
Debug.Log(operationResponse.ToString());
}
else
{
if (operationResponse.ReturnCode == ErrorCode.OperationNotAllowedInCurrentState)
{
Debug.LogError("Operation " + operationResponse.OperationCode + " could not be executed (yet). Wait for state JoinedLobby or ConnectedToMaster and their callbacks before calling operations. WebRPCs need a server-side configuration. Enum OperationCode helps identify the operation.");
}
else if (operationResponse.ReturnCode == ErrorCode.PluginReportedError)
{
Debug.LogError("Operation " + operationResponse.OperationCode + " failed in a server-side plugin. Check the configuration in the Dashboard. Message from server-plugin: " + operationResponse.DebugMessage);
}
else if (operationResponse.ReturnCode == ErrorCode.NoRandomMatchFound)
{
Debug.LogWarning("Operation failed: " + operationResponse.ToStringFull());
}
else
{
Debug.LogError("Operation failed: " + operationResponse.ToStringFull() + " Server: " + this.server);
}
}
// use the "secret" or "token" whenever we get it. doesn't really matter if it's in AuthResponse.
if (operationResponse.Parameters.ContainsKey(ParameterCode.Secret))
{
if (this.CustomAuthenticationValues == null)
{
this.CustomAuthenticationValues = new AuthenticationValues();
// this.DebugReturn(DebugLevel.ERROR, "Server returned secret. Created CustomAuthenticationValues.");
}
this.CustomAuthenticationValues.Token = operationResponse[ParameterCode.Secret] as string;
}
switch (operationResponse.OperationCode)
{
case OperationCode.Authenticate:
{
// PeerState oldState = this.State;
if (operationResponse.ReturnCode != 0)
{
if (operationResponse.ReturnCode == ErrorCode.InvalidOperation)
{
Debug.LogError(string.Format("If you host Photon yourself, make sure to start the 'Instance LoadBalancing' "+ this.ServerAddress));
}
else if (operationResponse.ReturnCode == ErrorCode.InvalidAuthentication)
{
Debug.LogError(string.Format("The appId this client sent is unknown on the server (Cloud). Check settings. If using the Cloud, check account."));
SendMonoMessage(PhotonNetworkingMessage.OnFailedToConnectToPhoton, DisconnectCause.InvalidAuthentication);
}
else if (operationResponse.ReturnCode == ErrorCode.CustomAuthenticationFailed)
{
Debug.LogError(string.Format("Custom Authentication failed (either due to user-input or configuration or AuthParameter string format). Calling: OnCustomAuthenticationFailed()"));
SendMonoMessage(PhotonNetworkingMessage.OnCustomAuthenticationFailed, operationResponse.DebugMessage);
}
else
{
Debug.LogError(string.Format("Authentication failed: '{0}' Code: {1}", operationResponse.DebugMessage, operationResponse.ReturnCode));
}
this.State = global::PeerState.Disconnecting;
this.Disconnect();
if (operationResponse.ReturnCode == ErrorCode.MaxCcuReached)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
Debug.LogWarning(string.Format("Currently, the limit of users is reached for this title. Try again later. Disconnecting"));
SendMonoMessage(PhotonNetworkingMessage.OnPhotonMaxCccuReached);
SendMonoMessage(PhotonNetworkingMessage.OnConnectionFail, DisconnectCause.MaxCcuReached);
}
else if (operationResponse.ReturnCode == ErrorCode.InvalidRegion)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
Debug.LogError(string.Format("The used master server address is not available with the subscription currently used. Got to Photon Cloud Dashboard or change URL. Disconnecting."));
SendMonoMessage(PhotonNetworkingMessage.OnConnectionFail, DisconnectCause.InvalidRegion);
}
else if (operationResponse.ReturnCode == ErrorCode.AuthenticationTicketExpired)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
Debug.LogError(string.Format("The authentication ticket expired. You need to connect (and authenticate) again. Disconnecting."));
SendMonoMessage(PhotonNetworkingMessage.OnConnectionFail, DisconnectCause.AuthenticationTicketExpired);
}
break;
}
else
{
// successful connect/auth. depending on the used server, do next steps:
if (this.server == ServerConnection.NameServer)
{
// on the NameServer, authenticate returns the MasterServer address for a region and we hop off to there
this.MasterServerAddress = operationResponse[ParameterCode.Address] as string;
this.DisconnectToReconnect();
}
else if (this.server == ServerConnection.MasterServer)
{
if (PhotonNetwork.autoJoinLobby)
{
this.State = global::PeerState.Authenticated;
this.OpJoinLobby(this.lobby);
}
else
{
this.State = global::PeerState.ConnectedToMaster;
NetworkingPeer.SendMonoMessage(PhotonNetworkingMessage.OnConnectedToMaster);
}
}
else if (this.server == ServerConnection.GameServer)
{
this.State = global::PeerState.Joining;
this.enterRoomParamsCache.PlayerProperties = GetLocalActorProperties();
this.enterRoomParamsCache.OnGameServer = true;
if (this.mLastJoinType == JoinType.JoinGame || this.mLastJoinType == JoinType.JoinRandomGame || this.mLastJoinType == JoinType.JoinOrCreateOnDemand)
{
// if we just "join" the game, do so. if we wanted to "create the room on demand", we have to send this to the game server as well.
this.OpJoinRoom(this.enterRoomParamsCache);
}
else if (this.mLastJoinType == JoinType.CreateGame)
{
this.OpCreateGame(this.enterRoomParamsCache);
}
}
if (operationResponse.Parameters.ContainsKey(ParameterCode.Data))
{
Dictionary<string, object> data = (Dictionary<string, object>)operationResponse.Parameters[ParameterCode.Data];
SendMonoMessage(PhotonNetworkingMessage.OnCustomAuthenticationResponse, data);
}
}
break;
}
case OperationCode.GetRegions:
// Debug.Log("GetRegions returned: " + operationResponse.ToStringFull());
if (operationResponse.ReturnCode == ErrorCode.InvalidAuthentication)
{
Debug.LogError(string.Format("The appId this client sent is unknown on the server (Cloud). Check settings. If using the Cloud, check account."));
SendMonoMessage(PhotonNetworkingMessage.OnFailedToConnectToPhoton, DisconnectCause.InvalidAuthentication);
this.State = global::PeerState.Disconnecting;
this.Disconnect();
break;
}
if (operationResponse.ReturnCode != ErrorCode.Ok)
{
Debug.LogError("GetRegions failed. Can't provide regions list. Error: " + operationResponse.ReturnCode + ": " + operationResponse.DebugMessage);
break;
}
string[] regions = operationResponse[ParameterCode.Region] as string[];
string[] servers = operationResponse[ParameterCode.Address] as string[];
if (regions == null || servers == null || regions.Length != servers.Length)
{
Debug.LogError("The region arrays from Name Server are not ok. Must be non-null and same length. " + (regions ==null)+ " " + (servers==null) + "\n"+operationResponse.ToStringFull());
break;
}
this.AvailableRegions = new List<Region>(regions.Length);
for (int i = 0; i < regions.Length; i++)
{
string regionCodeString = regions[i];
if (string.IsNullOrEmpty(regionCodeString))
{
continue;
}
regionCodeString = regionCodeString.ToLower();
CloudRegionCode code = Region.Parse(regionCodeString);
// check if enabled (or ignored by PhotonServerSettings.EnabledRegions)
bool enabledRegion = true;
if (PhotonNetwork.PhotonServerSettings.HostType == ServerSettings.HostingOption.BestRegion && PhotonNetwork.PhotonServerSettings.EnabledRegions != 0)
{
CloudRegionFlag flag = Region.ParseFlag(regionCodeString);
enabledRegion = ((PhotonNetwork.PhotonServerSettings.EnabledRegions & flag) != 0);
if (!enabledRegion && PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
{
Debug.Log("Skipping region because it's not in PhotonServerSettings.EnabledRegions: " + code);
}
}
if (enabledRegion) this.AvailableRegions.Add(new Region() { Code = code, HostAndPort = servers[i] });
}
// PUN assumes you fetch the name-server's list of regions to ping them
if (PhotonNetwork.PhotonServerSettings.HostType == ServerSettings.HostingOption.BestRegion)
{
PhotonHandler.PingAvailableRegionsAndConnectToBest();
}
break;
case OperationCode.CreateGame:
{
if (this.server == ServerConnection.GameServer)
{
this.GameEnteredOnGameServer(operationResponse);
}
else
{
if (operationResponse.ReturnCode != 0)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
Debug.LogWarning(string.Format("CreateRoom failed, client stays on masterserver: {0}.", operationResponse.ToStringFull()));
SendMonoMessage(PhotonNetworkingMessage.OnPhotonCreateRoomFailed, operationResponse.ReturnCode, operationResponse.DebugMessage);
break;
}
string gameID = (string) operationResponse[ParameterCode.RoomName];
if (!string.IsNullOrEmpty(gameID))
{
// is only sent by the server's response, if it has not been
// sent with the client's request before!
this.enterRoomParamsCache.RoomName = gameID;
}
this.mGameserver = (string)operationResponse[ParameterCode.Address];
this.DisconnectToReconnect();
}
break;
}
case OperationCode.JoinGame:
{
if (this.server != ServerConnection.GameServer)
{
if (operationResponse.ReturnCode != 0)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
Debug.Log(string.Format("JoinRoom failed (room maybe closed by now). Client stays on masterserver: {0}. State: {1}", operationResponse.ToStringFull(), this.State));
SendMonoMessage(PhotonNetworkingMessage.OnPhotonJoinRoomFailed, operationResponse.ReturnCode, operationResponse.DebugMessage);
break;
}
this.mGameserver = (string)operationResponse[ParameterCode.Address];
this.DisconnectToReconnect();
}
else
{
this.GameEnteredOnGameServer(operationResponse);
}
break;
}
case OperationCode.JoinRandomGame:
{
// happens only on master. on gameserver, this is a regular join (we don't need to find a random game again)
// the operation OpJoinRandom either fails (with returncode 8) or returns game-to-join information
if (operationResponse.ReturnCode != 0)
{
if (operationResponse.ReturnCode == ErrorCode.NoRandomMatchFound)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Full)
Debug.Log("JoinRandom failed: No open game. Calling: OnPhotonRandomJoinFailed() and staying on master server.");
}
else if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
{
Debug.LogWarning(string.Format("JoinRandom failed: {0}.", operationResponse.ToStringFull()));
}
SendMonoMessage(PhotonNetworkingMessage.OnPhotonRandomJoinFailed, operationResponse.ReturnCode, operationResponse.DebugMessage);
break;
}
string roomName = (string)operationResponse[ParameterCode.RoomName];
this.enterRoomParamsCache.RoomName = roomName;
this.mGameserver = (string)operationResponse[ParameterCode.Address];
this.DisconnectToReconnect();
break;
}
case OperationCode.JoinLobby:
this.State = global::PeerState.JoinedLobby;
this.insideLobby = true;
SendMonoMessage(PhotonNetworkingMessage.OnJoinedLobby);
// this.mListener.joinLobbyReturn();
break;
case OperationCode.LeaveLobby:
this.State = global::PeerState.Authenticated;
this.LeftLobbyCleanup(); // will set insideLobby = false
break;
case OperationCode.Leave:
this.DisconnectToReconnect();
break;
case OperationCode.SetProperties:
// this.mListener.setPropertiesReturn(returnCode, debugMsg);
break;
case OperationCode.GetProperties:
{
Hashtable actorProperties = (Hashtable)operationResponse[ParameterCode.PlayerProperties];
Hashtable gameProperties = (Hashtable)operationResponse[ParameterCode.GameProperties];
this.ReadoutProperties(gameProperties, actorProperties, 0);
// RemoveByteTypedPropertyKeys(actorProperties, false);
// RemoveByteTypedPropertyKeys(gameProperties, false);
// this.mListener.getPropertiesReturn(gameProperties, actorProperties, returnCode, debugMsg);
break;
}
case OperationCode.RaiseEvent:
// this usually doesn't give us a result. only if the caching is affected the server will send one.
break;
case OperationCode.FindFriends:
bool[] onlineList = operationResponse[ParameterCode.FindFriendsResponseOnlineList] as bool[];
string[] roomList = operationResponse[ParameterCode.FindFriendsResponseRoomIdList] as string[];
if (onlineList != null && roomList != null && this.friendListRequested != null && onlineList.Length == this.friendListRequested.Length)
{
List<FriendInfo> friendList = new List<FriendInfo>(this.friendListRequested.Length);
for (int index = 0; index < this.friendListRequested.Length; index++)
{
FriendInfo friend = new FriendInfo();
friend.Name = this.friendListRequested[index];
friend.Room = roomList[index];
friend.IsOnline = onlineList[index];
friendList.Insert(index, friend);
}
PhotonNetwork.Friends = friendList;
}
else
{
// any of the lists is null and shouldn't. print a error
Debug.LogError("FindFriends failed to apply the result, as a required value wasn't provided or the friend list length differed from result.");
}
this.friendListRequested = null;
this.isFetchingFriends = false;
this.friendListTimestamp = Environment.TickCount;
if (this.friendListTimestamp == 0)
{
this.friendListTimestamp = 1; // makes sure the timestamp is not accidentally 0
}
SendMonoMessage(PhotonNetworkingMessage.OnUpdatedFriendList);
break;
case OperationCode.WebRpc:
SendMonoMessage(PhotonNetworkingMessage.OnWebRpcResponse, operationResponse);
break;
default:
Debug.LogWarning(string.Format("OperationResponse unhandled: {0}", operationResponse.ToString()));
break;
}
//this.externalListener.OnOperationResponse(operationResponse);
}
/// <summary>
/// Request the rooms and online status for a list of friends. All client must set a unique username via PlayerName property. The result is available in this.Friends.
/// </summary>
/// <remarks>
/// Used on Master Server to find the rooms played by a selected list of users.
/// The result will be mapped to LoadBalancingClient.Friends when available.
/// The list is initialized by OpFindFriends on first use (before that, it is null).
///
/// Users identify themselves by setting a PlayerName in the LoadBalancingClient instance.
/// This in turn will send the name in OpAuthenticate after each connect (to master and game servers).
/// Note: Changing a player's name doesn't make sense when using a friend list.
///
/// The list of usernames must be fetched from some other source (not provided by Photon).
///
///
/// Internal:
/// The server response includes 2 arrays of info (each index matching a friend from the request):
/// ParameterCode.FindFriendsResponseOnlineList = bool[] of online states
/// ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room)
/// </remarks>
/// <param name="friendsToFind">Array of friend's names (make sure they are unique).</param>
/// <returns>If the operation could be sent (requires connection, only one request is allowed at any time). Always false in offline mode.</returns>
public override bool OpFindFriends(string[] friendsToFind)
{
if (this.isFetchingFriends)
{
return false; // fetching friends currently, so don't do it again (avoid changing the list while fetching friends)
}
this.friendListRequested = friendsToFind;
this.isFetchingFriends = true;
return base.OpFindFriends(friendsToFind);
}
public void OnStatusChanged(StatusCode statusCode)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
Debug.Log(string.Format("OnStatusChanged: {0}", statusCode.ToString()));
switch (statusCode)
{
case StatusCode.Connect:
if (this.State == global::PeerState.ConnectingToNameServer)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Full)
Debug.Log("Connected to NameServer.");
this.server = ServerConnection.NameServer;
if (this.CustomAuthenticationValues != null)
{
this.CustomAuthenticationValues.Token = null; // when connecting to NameServer, invalidate any auth values
}
}
if (this.State == global::PeerState.ConnectingToGameserver)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Full)
Debug.Log("Connected to gameserver.");
this.server = ServerConnection.GameServer;
this.State = global::PeerState.ConnectedToGameserver;
}
if (this.State == global::PeerState.ConnectingToMasterserver)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Full)
Debug.Log("Connected to masterserver.");
this.server = ServerConnection.MasterServer;
this.State = global::PeerState.Authenticating; // photon v4 always requires OpAuthenticate. even self-hosted Photon Server
if (this.IsInitialConnect)
{
this.IsInitialConnect = false; // after handling potential initial-connect issues with special messages, we are now sure we can reach a server
SendMonoMessage(PhotonNetworkingMessage.OnConnectedToPhoton);
}
}
if (!this.IsProtocolSecure)
{
this.EstablishEncryption();
}
else
{
Debug.Log("Skipping EstablishEncryption. Protocol is secure.");
}
if (this.IsAuthorizeSecretAvailable || this.IsProtocolSecure)
{
// if we have a token we don't have to wait for encryption (it is encrypted anyways, so encryption is just optional later on)
AuthenticationValues auth = this.CustomAuthenticationValues ?? new AuthenticationValues() { UserId = this.PlayerName };
this.didAuthenticate = this.OpAuthenticate(this.mAppId, this.mAppVersionPun, auth, this.CloudRegion.ToString(), requestLobbyStatistics);
if (this.didAuthenticate)
{
this.State = global::PeerState.Authenticating;
}
}
break;
case StatusCode.EncryptionEstablished:
// on nameserver, the "process" is stopped here, so the developer/game can either get regions or authenticate with a specific region
if (this.server == ServerConnection.NameServer)
{
this.State = global::PeerState.ConnectedToNameServer;
if (!this.didAuthenticate && this.CloudRegion == CloudRegionCode.none)
{
// this client is not setup to connect to a default region. find out which regions there are!
this.OpGetRegions(this.mAppId);
}
}
// we might need to authenticate automatically now, so the client can do anything at all
if (!this.didAuthenticate && (!this.IsUsingNameServer || this.CloudRegion != CloudRegionCode.none))
{
// once encryption is availble, the client should send one (secure) authenticate. it includes the AppId (which identifies your app on the Photon Cloud)
AuthenticationValues auth = this.CustomAuthenticationValues ?? new AuthenticationValues() { UserId = this.PlayerName };
this.didAuthenticate = this.OpAuthenticate(this.mAppId, this.mAppVersionPun, auth, this.CloudRegion.ToString(), requestLobbyStatistics);
if (this.didAuthenticate)
{
this.State = global::PeerState.Authenticating;
}
}
break;
case StatusCode.EncryptionFailedToEstablish:
Debug.LogError("Encryption wasn't established: " + statusCode + ". Going to authenticate anyways.");
AuthenticationValues authV = this.CustomAuthenticationValues ?? new AuthenticationValues() { UserId = this.PlayerName };
this.OpAuthenticate(this.mAppId, this.mAppVersionPun, authV, this.CloudRegion.ToString(), requestLobbyStatistics); // TODO: check if there are alternatives
break;
case StatusCode.Disconnect:
this.didAuthenticate = false;
this.isFetchingFriends = false;
if (server == ServerConnection.GameServer) this.LeftRoomCleanup();
if (server == ServerConnection.MasterServer) this.LeftLobbyCleanup();
if (this.State == global::PeerState.DisconnectingFromMasterserver)
{
if (this.Connect(this.mGameserver, ServerConnection.GameServer))
{
this.State = global::PeerState.ConnectingToGameserver;
}
}
else if (this.State == global::PeerState.DisconnectingFromGameserver || this.State == global::PeerState.DisconnectingFromNameServer)
{
if (this.Connect(this.MasterServerAddress, ServerConnection.MasterServer))
{
this.State = global::PeerState.ConnectingToMasterserver;
}
}
else
{
if (this.CustomAuthenticationValues != null)
{
this.CustomAuthenticationValues.Token = null; // invalidate any custom auth secrets
}
this.State = global::PeerState.PeerCreated; // if we set another state here, we could keep clients from connecting in OnDisconnectedFromPhoton right here.
SendMonoMessage(PhotonNetworkingMessage.OnDisconnectedFromPhoton);
}
break;
case StatusCode.SecurityExceptionOnConnect:
case StatusCode.ExceptionOnConnect:
this.State = global::PeerState.PeerCreated;
if (this.CustomAuthenticationValues != null)
{
this.CustomAuthenticationValues.Token = null; // invalidate any custom auth secrets
}
DisconnectCause cause = (DisconnectCause)statusCode;
SendMonoMessage(PhotonNetworkingMessage.OnFailedToConnectToPhoton, cause);
break;
case StatusCode.Exception:
if (this.IsInitialConnect)
{
Debug.LogError("Exception while connecting to: " + this.ServerAddress + ". Check if the server is available.");
if (this.ServerAddress == null || this.ServerAddress.StartsWith("127.0.0.1"))
{
Debug.LogWarning("The server address is 127.0.0.1 (localhost): Make sure the server is running on this machine. Android and iOS emulators have their own localhost.");
if (this.ServerAddress == this.mGameserver)
{
Debug.LogWarning("This might be a misconfiguration in the game server config. You need to edit it to a (public) address.");
}
}
this.State = global::PeerState.PeerCreated;
cause = (DisconnectCause)statusCode;
SendMonoMessage(PhotonNetworkingMessage.OnFailedToConnectToPhoton, cause);
}
else
{
this.State = global::PeerState.PeerCreated;
cause = (DisconnectCause)statusCode;
SendMonoMessage(PhotonNetworkingMessage.OnConnectionFail, cause);
}
this.Disconnect();
break;
case StatusCode.TimeoutDisconnect:
case StatusCode.ExceptionOnReceive:
case StatusCode.DisconnectByServer:
case StatusCode.DisconnectByServerLogic:
case StatusCode.DisconnectByServerUserLimit:
if (this.IsInitialConnect)
{
Debug.LogWarning(statusCode + " while connecting to: " + this.ServerAddress + ". Check if the server is available.");
cause = (DisconnectCause)statusCode;
SendMonoMessage(PhotonNetworkingMessage.OnFailedToConnectToPhoton, cause);
}
else
{
cause = (DisconnectCause)statusCode;
SendMonoMessage(PhotonNetworkingMessage.OnConnectionFail, cause);
}
if (this.CustomAuthenticationValues != null)
{
this.CustomAuthenticationValues.Token = null; // invalidate any custom auth secrets
}
this.Disconnect();
break;
case StatusCode.SendError:
// this.mListener.clientErrorReturn(statusCode);
break;
case StatusCode.QueueOutgoingReliableWarning:
case StatusCode.QueueOutgoingUnreliableWarning:
case StatusCode.QueueOutgoingAcksWarning:
case StatusCode.QueueSentWarning:
// this.mListener.warningReturn(statusCode);
break;
case StatusCode.QueueIncomingReliableWarning:
case StatusCode.QueueIncomingUnreliableWarning:
Debug.Log(statusCode + ". This client buffers many incoming messages. This is OK temporarily. With lots of these warnings, check if you send too much or execute messages too slow. " + (PhotonNetwork.isMessageQueueRunning? "":"Your isMessageQueueRunning is false. This can cause the issue temporarily.") );
break;
// // TCP "routing" is an option of Photon that's not currently needed (or supported) by PUN
//case StatusCode.TcpRouterResponseOk:
// break;
//case StatusCode.TcpRouterResponseEndpointUnknown:
//case StatusCode.TcpRouterResponseNodeIdUnknown:
//case StatusCode.TcpRouterResponseNodeNotReady:
// this.DebugReturn(DebugLevel.ERROR, "Unexpected router response: " + statusCode);
// break;
default:
// this.mListener.serverErrorReturn(statusCode.value());
Debug.LogError("Received unknown status code: " + statusCode);
break;
}
//this.externalListener.OnStatusChanged(statusCode);
}
public void OnEvent(EventData photonEvent)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
Debug.Log(string.Format("OnEvent: {0}", photonEvent.ToString()));
int actorNr = -1;
PhotonPlayer originatingPlayer = null;
if (photonEvent.Parameters.ContainsKey(ParameterCode.ActorNr))
{
actorNr = (int)photonEvent[ParameterCode.ActorNr];
originatingPlayer = this.GetPlayerWithId(actorNr);
//else
//{
// // the actor sending this event is not in actorlist. this is usually no problem
// if (photonEvent.Code != (byte)LiteOpCode.Join)
// {
// Debug.LogWarning("Received event, but we do not have this actor: " + actorNr);
// }
//}
}
switch (photonEvent.Code)
{
case PunEvent.OwnershipRequest:
{
int[] requestValues = (int[]) photonEvent.Parameters[ParameterCode.CustomEventContent];
int requestedViewId = requestValues[0];
int currentOwner = requestValues[1];
Debug.Log("Ev OwnershipRequest: " + photonEvent.Parameters.ToStringFull() + " ViewID: " + requestedViewId + " from: " + currentOwner + " Time: " + Environment.TickCount%1000);
PhotonView requestedView = PhotonView.Find(requestedViewId);
if (requestedView == null)
{
Debug.LogWarning("Can't find PhotonView of incoming OwnershipRequest. ViewId not found: " + requestedViewId);
break;
}
Debug.Log("Ev OwnershipRequest PhotonView.ownershipTransfer: " + requestedView.ownershipTransfer + " .ownerId: " + requestedView.ownerId + " isOwnerActive: " + requestedView.isOwnerActive + ". This client's player: " + PhotonNetwork.player.ToStringFull());
switch (requestedView.ownershipTransfer)
{
case OwnershipOption.Fixed:
Debug.LogWarning("Ownership mode == fixed. Ignoring request.");
break;
case OwnershipOption.Takeover:
if (currentOwner == requestedView.ownerId)
{
// a takeover is successful automatically, if taken from current owner
requestedView.ownerId = actorNr;
}
break;
case OwnershipOption.Request:
if (currentOwner == PhotonNetwork.player.ID || PhotonNetwork.player.isMasterClient)
{
if ((requestedView.ownerId == PhotonNetwork.player.ID) || (PhotonNetwork.player.isMasterClient && !requestedView.isOwnerActive))
{
SendMonoMessage(PhotonNetworkingMessage.OnOwnershipRequest, new object[] {requestedView, originatingPlayer});
}
}
break;
default:
break;
}
}
break;
case PunEvent.OwnershipTransfer:
{
int[] transferViewToUserID = (int[]) photonEvent.Parameters[ParameterCode.CustomEventContent];
Debug.Log("Ev OwnershipTransfer. ViewID " + transferViewToUserID[0] + " to: " + transferViewToUserID[1] + " Time: " + Environment.TickCount%1000);
int requestedViewId = transferViewToUserID[0];
int newOwnerId = transferViewToUserID[1];
PhotonView pv = PhotonView.Find(requestedViewId);
if (pv != null)
{
pv.ownerId = newOwnerId;
}
break;
}
case EventCode.GameList:
{
this.mGameList = new Dictionary<string, RoomInfo>();
Hashtable games = (Hashtable)photonEvent[ParameterCode.GameList];
foreach (DictionaryEntry game in games)
{
string gameName = (string)game.Key;
this.mGameList[gameName] = new RoomInfo(gameName, (Hashtable)game.Value);
}
mGameListCopy = new RoomInfo[mGameList.Count];
mGameList.Values.CopyTo(mGameListCopy, 0);
SendMonoMessage(PhotonNetworkingMessage.OnReceivedRoomListUpdate);
break;
}
case EventCode.GameListUpdate:
{
Hashtable games = (Hashtable)photonEvent[ParameterCode.GameList];
foreach (DictionaryEntry room in games)
{
string gameName = (string)room.Key;
RoomInfo game = new RoomInfo(gameName, (Hashtable)room.Value);
if (game.removedFromList)
{
this.mGameList.Remove(gameName);
}
else
{
this.mGameList[gameName] = game;
}
}
this.mGameListCopy = new RoomInfo[this.mGameList.Count];
this.mGameList.Values.CopyTo(this.mGameListCopy, 0);
SendMonoMessage(PhotonNetworkingMessage.OnReceivedRoomListUpdate);
break;
}
case EventCode.QueueState:
// not used anymore
break;
case EventCode.AppStats:
// Debug.LogInfo("Received stats!");
this.mPlayersInRoomsCount = (int)photonEvent[ParameterCode.PeerCount];
this.mPlayersOnMasterCount = (int)photonEvent[ParameterCode.MasterPeerCount];
this.mGameCount = (int)photonEvent[ParameterCode.GameCount];
break;
case EventCode.Join:
// actorNr is fetched out of event above
Hashtable actorProperties = (Hashtable)photonEvent[ParameterCode.PlayerProperties];
if (originatingPlayer == null)
{
bool isLocal = this.mLocalActor.ID == actorNr;
this.AddNewPlayer(actorNr, new PhotonPlayer(isLocal, actorNr, actorProperties));
this.ResetPhotonViewsOnSerialize(); // This sets the correct OnSerializeState for Reliable OnSerialize
}
else
{
originatingPlayer.InternalCacheProperties(actorProperties);
//originatingPlayer.IsInactive = false;
}
if (actorNr == this.mLocalActor.ID)
{
// in this player's 'own' join event, we get a complete list of players in the room, so check if we know all players
int[] actorsInRoom = (int[])photonEvent[ParameterCode.ActorList];
this.UpdatedActorList(actorsInRoom);
// joinWithCreateOnDemand can turn an OpJoin into creating the room. Then actorNumber is 1 and callback: OnCreatedRoom()
if (this.mLastJoinType == JoinType.JoinOrCreateOnDemand && this.mLocalActor.ID == 1)
{
SendMonoMessage(PhotonNetworkingMessage.OnCreatedRoom);
}
SendMonoMessage(PhotonNetworkingMessage.OnJoinedRoom); //Always send OnJoinedRoom
}
else
{
SendMonoMessage(PhotonNetworkingMessage.OnPhotonPlayerConnected, this.mActors[actorNr]);
}
break;
case EventCode.Leave:
this.HandleEventLeave(actorNr, photonEvent);
break;
case EventCode.PropertiesChanged:
int targetActorNr = (int)photonEvent[ParameterCode.TargetActorNr];
Hashtable gameProperties = null;
Hashtable actorProps = null;
if (targetActorNr == 0)
{
gameProperties = (Hashtable)photonEvent[ParameterCode.Properties];
}
else
{
actorProps = (Hashtable)photonEvent[ParameterCode.Properties];
}
this.ReadoutProperties(gameProperties, actorProps, targetActorNr);
break;
case PunEvent.RPC:
//ts: each event now contains a single RPC. execute this
// Debug.Log("Ev RPC from: " + originatingPlayer);
this.ExecuteRpc(photonEvent[ParameterCode.Data] as object[], originatingPlayer);
break;
case PunEvent.SendSerialize:
case PunEvent.SendSerializeReliable:
Hashtable serializeData = (Hashtable)photonEvent[ParameterCode.Data];
//Debug.Log(serializeData.ToStringFull());
int remoteUpdateServerTimestamp = (int)serializeData[(byte)0];
short remoteLevelPrefix = -1;
short initialDataIndex = 1;
if (serializeData.ContainsKey((byte)1))
{
remoteLevelPrefix = (short)serializeData[(byte)1];
initialDataIndex = 2;
}
for (short s = initialDataIndex; s < serializeData.Count; s++)
{
this.OnSerializeRead(serializeData[s] as object[], originatingPlayer, remoteUpdateServerTimestamp, remoteLevelPrefix);
}
break;
case PunEvent.Instantiation:
this.DoInstantiate((Hashtable)photonEvent[ParameterCode.Data], originatingPlayer, null);
break;
case PunEvent.CloseConnection:
// MasterClient "requests" a disconnection from us
if (originatingPlayer == null || !originatingPlayer.isMasterClient)
{
Debug.LogError("Error: Someone else(" + originatingPlayer + ") then the masterserver requests a disconnect!");
}
else
{
PhotonNetwork.LeaveRoom();
}
break;
case PunEvent.DestroyPlayer:
Hashtable evData = (Hashtable)photonEvent[ParameterCode.Data];
int targetPlayerId = (int)evData[(byte)0];
if (targetPlayerId >= 0)
{
this.DestroyPlayerObjects(targetPlayerId, true);
}
else
{
if (this.DebugOut >= DebugLevel.INFO) Debug.Log("Ev DestroyAll! By PlayerId: " + actorNr);
this.DestroyAll(true);
}
break;
case PunEvent.Destroy:
evData = (Hashtable)photonEvent[ParameterCode.Data];
int instantiationId = (int)evData[(byte)0];
// Debug.Log("Ev Destroy for viewId: " + instantiationId + " sent by owner: " + (instantiationId / PhotonNetwork.MAX_VIEW_IDS == actorNr) + " this client is owner: " + (instantiationId / PhotonNetwork.MAX_VIEW_IDS == this.mLocalActor.ID));
PhotonView pvToDestroy = null;
if (this.photonViewList.TryGetValue(instantiationId, out pvToDestroy))
{
this.RemoveInstantiatedGO(pvToDestroy.gameObject, true);
}
else
{
if (this.DebugOut >= DebugLevel.ERROR) Debug.LogError("Ev Destroy Failed. Could not find PhotonView with instantiationId " + instantiationId + ". Sent by actorNr: " + actorNr);
}
break;
case PunEvent.AssignMaster:
evData = (Hashtable)photonEvent[ParameterCode.Data];
int newMaster = (int)evData[(byte)1];
this.SetMasterClient(newMaster, false);
break;
case EventCode.LobbyStats:
//Debug.Log("LobbyStats EV: " + photonEvent.ToStringFull());
string[] names = photonEvent[ParameterCode.LobbyName] as string[];
byte[] types = photonEvent[ParameterCode.LobbyType] as byte[];
int[] peers = photonEvent[ParameterCode.PeerCount] as int[];
int[] rooms = photonEvent[ParameterCode.GameCount] as int[];
this.LobbyStatistics.Clear();
for (int i = 0; i < names.Length; i++)
{
TypedLobbyInfo info = new TypedLobbyInfo();
info.Name = names[i];
info.Type = (LobbyType)types[i];
info.PlayerCount = peers[i];
info.RoomCount = rooms[i];
this.LobbyStatistics.Add(info);
}
SendMonoMessage(PhotonNetworkingMessage.OnLobbyStatisticsUpdate);
break;
default:
if (photonEvent.Code < 200)
{
if (PhotonNetwork.OnEventCall != null)
{
object content = photonEvent[ParameterCode.Data];
PhotonNetwork.OnEventCall(photonEvent.Code, content, actorNr);
}
else
{
Debug.LogWarning("Warning: Unhandled event " + photonEvent + ". Set PhotonNetwork.OnEventCall.");
}
}
break;
}
//this.externalListener.OnEvent(photonEvent);
}
protected internal void UpdatedActorList(int[] actorsInRoom)
{
for (int i = 0; i < actorsInRoom.Length; i++)
{
int actorNrToCheck = actorsInRoom[i];
if (this.mLocalActor.ID != actorNrToCheck && !this.mActors.ContainsKey(actorNrToCheck))
{
this.AddNewPlayer(actorNrToCheck, new PhotonPlayer(false, actorNrToCheck, string.Empty));
}
}
}
private void SendVacantViewIds()
{
Debug.Log("SendVacantViewIds()");
List<int> vacantViews = new List<int>();
foreach (PhotonView view in this.photonViewList.Values)
{
if (!view.isOwnerActive)
{
vacantViews.Add(view.viewID);
}
}
Debug.Log("Sending vacant view IDs. Length: " + vacantViews.Count);
//this.OpRaiseEvent(PunEvent.VacantViewIds, true, vacantViews.ToArray());
this.OpRaiseEvent(PunEvent.VacantViewIds, vacantViews.ToArray(), true, null);
}
#endregion
public static void SendMonoMessage(PhotonNetworkingMessage methodString, params object[] parameters)
{
HashSet<GameObject> objectsToCall;
if (PhotonNetwork.SendMonoMessageTargets != null)
{
objectsToCall = PhotonNetwork.SendMonoMessageTargets;
}
else
{
objectsToCall = PhotonNetwork.FindGameObjectsWithComponent(PhotonNetwork.SendMonoMessageTargetType);
}
string methodName = methodString.ToString();
object callParameter = (parameters != null && parameters.Length == 1) ? parameters[0] : parameters;
foreach (GameObject gameObject in objectsToCall)
{
gameObject.SendMessage(methodName, callParameter, SendMessageOptions.DontRequireReceiver);
}
}
// PHOTONVIEW/RPC related
/// <summary>
/// Executes a received RPC event
/// </summary>
protected internal void ExecuteRpc(object[] rpcData, PhotonPlayer sender)
{
if (rpcData == null)
{
Debug.LogError("Malformed RPC; this should never occur. Content: " + LogObjectArray(rpcData));
return;
}
// ts: updated with "flat" event data
int netViewID = (int)rpcData[(byte)0]; // LIMITS PHOTONVIEWS&PLAYERS
int otherSidePrefix = 0; // by default, the prefix is 0 (and this is not being sent)
if (rpcData[1] != null)
{
otherSidePrefix = (short)rpcData[(byte)1];
}
string inMethodName;
if (rpcData[5] != null)
{
int rpcIndex = (byte)rpcData[5]; // LIMITS RPC COUNT
if (rpcIndex > PhotonNetwork.PhotonServerSettings.RpcList.Count - 1)
{
Debug.LogError("Could not find RPC with index: " + rpcIndex + ". Going to ignore! Check PhotonServerSettings.RpcList");
return;
}
else
{
inMethodName = PhotonNetwork.PhotonServerSettings.RpcList[rpcIndex];
}
}
else
{
inMethodName = (string)rpcData[3];
}
object[] inMethodParameters = (object[])rpcData[4];
if (inMethodParameters == null)
{
inMethodParameters = new object[0];
}
PhotonView photonNetview = this.GetPhotonView(netViewID);
if (photonNetview == null)
{
int viewOwnerId = netViewID/PhotonNetwork.MAX_VIEW_IDS;
bool owningPv = (viewOwnerId == this.mLocalActor.ID);
bool ownerSent = (viewOwnerId == sender.ID);
if (owningPv)
{
Debug.LogWarning("Received RPC \"" + inMethodName + "\" for viewID " + netViewID + " but this PhotonView does not exist! View was/is ours." + (ownerSent ? " Owner called." : " Remote called.") + " By: " + sender.ID);
}
else
{
Debug.LogWarning("Received RPC \"" + inMethodName + "\" for viewID " + netViewID + " but this PhotonView does not exist! Was remote PV." + (ownerSent ? " Owner called." : " Remote called.") + " By: " + sender.ID + " Maybe GO was destroyed but RPC not cleaned up.");
}
return;
}
if (photonNetview.prefix != otherSidePrefix)
{
Debug.LogError("Received RPC \"" + inMethodName + "\" on viewID " + netViewID + " with a prefix of " + otherSidePrefix + ", our prefix is " + photonNetview.prefix + ". The RPC has been ignored.");
return;
}
// Get method name
if (string.IsNullOrEmpty(inMethodName))
{
Debug.LogError("Malformed RPC; this should never occur. Content: " + LogObjectArray(rpcData));
return;
}
if (PhotonNetwork.logLevel >= PhotonLogLevel.Full)
Debug.Log("Received RPC: " + inMethodName);
// SetReceiving filtering
if (photonNetview.group != 0 && !allowedReceivingGroups.Contains(photonNetview.group))
{
return; // Ignore group
}
Type[] argTypes = new Type[0];
if (inMethodParameters.Length > 0)
{
argTypes = new Type[inMethodParameters.Length];
int i = 0;
for (int index = 0; index < inMethodParameters.Length; index++)
{
object objX = inMethodParameters[index];
if (objX == null)
{
argTypes[i] = null;
}
else
{
argTypes[i] = objX.GetType();
}
i++;
}
}
int receivers = 0;
int foundMethods = 0;
if (!PhotonNetwork.UseRpcMonoBehaviourCache || photonNetview.RpcMonoBehaviours == null || photonNetview.RpcMonoBehaviours.Length == 0)
{
photonNetview.RefreshRpcMonoBehaviourCache();
}
for (int componentsIndex = 0; componentsIndex < photonNetview.RpcMonoBehaviours.Length; componentsIndex++)
{
MonoBehaviour monob = photonNetview.RpcMonoBehaviours[componentsIndex];
if (monob == null)
{
Debug.LogError("ERROR You have missing MonoBehaviours on your gameobjects!");
continue;
}
Type type = monob.GetType();
// Get [PunRPC] methods from cache
List<MethodInfo> cachedRPCMethods = null;
bool methodsOfTypeInCache = this.monoRPCMethodsCache.TryGetValue(type, out cachedRPCMethods);
if (!methodsOfTypeInCache)
{
List<MethodInfo> entries = SupportClass.GetMethods(type, typeof(PunRPC));
this.monoRPCMethodsCache[type] = entries;
cachedRPCMethods = entries;
}
if (cachedRPCMethods == null)
{
continue;
}
// Check cache for valid methodname+arguments
for (int index = 0; index < cachedRPCMethods.Count; index++)
{
MethodInfo mInfo = cachedRPCMethods[index];
if (mInfo.Name.Equals(inMethodName))
{
foundMethods++;
ParameterInfo[] pArray = mInfo.GetParameters(); // TODO: this should be cached, too, in best case
if (pArray.Length == argTypes.Length)
{
// Normal, PhotonNetworkMessage left out
if (this.CheckTypeMatch(pArray, argTypes))
{
receivers++;
object result = mInfo.Invoke((object)monob, inMethodParameters);
if (mInfo.ReturnType == typeof(IEnumerator))
{
monob.StartCoroutine((IEnumerator)result);
}
}
}
else if ((pArray.Length - 1) == argTypes.Length)
{
// Check for PhotonNetworkMessage being the last
if (this.CheckTypeMatch(pArray, argTypes))
{
if (pArray[pArray.Length - 1].ParameterType == typeof(PhotonMessageInfo))
{
receivers++;
int sendTime = (int)rpcData[(byte)2];
object[] deParamsWithInfo = new object[inMethodParameters.Length + 1];
inMethodParameters.CopyTo(deParamsWithInfo, 0);
deParamsWithInfo[deParamsWithInfo.Length - 1] = new PhotonMessageInfo(sender, sendTime, photonNetview);
object result = mInfo.Invoke((object)monob, deParamsWithInfo);
if (mInfo.ReturnType == typeof(IEnumerator))
{
monob.StartCoroutine((IEnumerator)result);
}
}
}
}
else if (pArray.Length == 1 && pArray[0].ParameterType.IsArray)
{
receivers++;
object result = mInfo.Invoke((object)monob, new object[] { inMethodParameters });
if (mInfo.ReturnType == typeof(IEnumerator))
{
monob.StartCoroutine((IEnumerator)result);
}
}
}
}
}
// Error handling
if (receivers != 1)
{
string argsString = string.Empty;
for (int index = 0; index < argTypes.Length; index++)
{
Type ty = argTypes[index];
if (argsString != string.Empty)
{
argsString += ", ";
}
if (ty == null)
{
argsString += "null";
}
else
{
argsString += ty.Name;
}
}
if (receivers == 0)
{
if (foundMethods == 0)
{
Debug.LogError("PhotonView with ID " + netViewID + " has no method \"" + inMethodName + "\" marked with the [PunRPC](C#) or @PunRPC(JS) property! Args: " + argsString);
}
else
{
Debug.LogError("PhotonView with ID " + netViewID + " has no method \"" + inMethodName + "\" that takes " + argTypes.Length + " argument(s): " + argsString);
}
}
else
{
Debug.LogError("PhotonView with ID " + netViewID + " has " + receivers + " methods \"" + inMethodName + "\" that takes " + argTypes.Length + " argument(s): " + argsString + ". Should be just one?");
}
}
}
/// <summary>
/// Check if all types match with parameters. We can have more paramters then types (allow last RPC type to be different).
/// </summary>
/// <param name="methodParameters"></param>
/// <param name="callParameterTypes"></param>
/// <returns>If the types-array has matching parameters (of method) in the parameters array (which may be longer).</returns>
private bool CheckTypeMatch(ParameterInfo[] methodParameters, Type[] callParameterTypes)
{
if (methodParameters.Length < callParameterTypes.Length)
{
return false;
}
for (int index = 0; index < callParameterTypes.Length; index++)
{
#if NETFX_CORE
TypeInfo methodParamTI = methodParameters[index].ParameterType.GetTypeInfo();
TypeInfo callParamTI = callParameterTypes[index].GetTypeInfo();
if (callParameterTypes[index] != null && !methodParamTI.IsAssignableFrom(callParamTI) && !(callParamTI.IsEnum && System.Enum.GetUnderlyingType(methodParamTI.AsType()).GetTypeInfo().IsAssignableFrom(callParamTI)))
{
return false;
}
#else
Type type = methodParameters[index].ParameterType;
if (callParameterTypes[index] != null && !type.IsAssignableFrom(callParameterTypes[index]) && !(type.IsEnum && System.Enum.GetUnderlyingType(type).IsAssignableFrom(callParameterTypes[index])))
{
return false;
}
#endif
}
return true;
}
internal Hashtable SendInstantiate(string prefabName, Vector3 position, Quaternion rotation, int group, int[] viewIDs, object[] data, bool isGlobalObject)
{
// first viewID is now also the gameobject's instantiateId
int instantiateId = viewIDs[0]; // LIMITS PHOTONVIEWS&PLAYERS
//TODO: reduce hashtable key usage by using a parameter array for the various values
Hashtable instantiateEvent = new Hashtable(); // This players info is sent via ActorID
instantiateEvent[(byte)0] = prefabName;
if (position != Vector3.zero)
{
instantiateEvent[(byte)1] = position;
}
if (rotation != Quaternion.identity)
{
instantiateEvent[(byte)2] = rotation;
}
if (group != 0)
{
instantiateEvent[(byte)3] = group;
}
// send the list of viewIDs only if there are more than one. else the instantiateId is the viewID
if (viewIDs.Length > 1)
{
instantiateEvent[(byte)4] = viewIDs; // LIMITS PHOTONVIEWS&PLAYERS
}
if (data != null)
{
instantiateEvent[(byte)5] = data;
}
if (this.currentLevelPrefix > 0)
{
instantiateEvent[(byte)8] = this.currentLevelPrefix; // photonview's / object's level prefix
}
instantiateEvent[(byte)6] = this.ServerTimeInMilliSeconds;
instantiateEvent[(byte)7] = instantiateId;
RaiseEventOptions options = new RaiseEventOptions();
options.CachingOption = (isGlobalObject) ? EventCaching.AddToRoomCacheGlobal : EventCaching.AddToRoomCache;
this.OpRaiseEvent(PunEvent.Instantiation, instantiateEvent, true, options);
return instantiateEvent;
}
internal GameObject DoInstantiate(Hashtable evData, PhotonPlayer photonPlayer, GameObject resourceGameObject)
{
// some values always present:
string prefabName = (string)evData[(byte)0];
int serverTime = (int)evData[(byte)6];
int instantiationId = (int)evData[(byte)7];
Vector3 position;
if (evData.ContainsKey((byte)1))
{
position = (Vector3)evData[(byte)1];
}
else
{
position = Vector3.zero;
}
Quaternion rotation = Quaternion.identity;
if (evData.ContainsKey((byte)2))
{
rotation = (Quaternion)evData[(byte)2];
}
int group = 0;
if (evData.ContainsKey((byte)3))
{
group = (int)evData[(byte)3];
}
short objLevelPrefix = 0;
if (evData.ContainsKey((byte)8))
{
objLevelPrefix = (short)evData[(byte)8];
}
int[] viewsIDs;
if (evData.ContainsKey((byte)4))
{
viewsIDs = (int[])evData[(byte)4];
}
else
{
viewsIDs = new int[1] { instantiationId };
}
object[] incomingInstantiationData;
if (evData.ContainsKey((byte)5))
{
incomingInstantiationData = (object[])evData[(byte)5];
}
else
{
incomingInstantiationData = null;
}
// SetReceiving filtering
if (group != 0 && !this.allowedReceivingGroups.Contains(group))
{
return null; // Ignore group
}
if (ObjectPool != null)
{
GameObject go = ObjectPool.Instantiate(prefabName, position, rotation);
PhotonView[] photonViews = go.GetPhotonViewsInChildren();
if (photonViews.Length != viewsIDs.Length)
{
throw new Exception("Error in Instantiation! The resource's PhotonView count is not the same as in incoming data.");
}
for (int i = 0; i < photonViews.Length; i++)
{
photonViews[i].didAwake = false;
photonViews[i].viewID = 0;
photonViews[i].prefix = objLevelPrefix;
photonViews[i].instantiationId = instantiationId;
photonViews[i].isRuntimeInstantiated = true;
photonViews[i].instantiationDataField = incomingInstantiationData;
photonViews[i].didAwake = true;
photonViews[i].viewID = viewsIDs[i]; // with didAwake true and viewID == 0, this will also register the view
}
// Send OnPhotonInstantiate callback to newly created GO.
// GO will be enabled when instantiated from Prefab and it does not matter if the script is enabled or disabled.
go.SendMessage(PhotonNetworkingMessage.OnPhotonInstantiate.ToString(), new PhotonMessageInfo(photonPlayer, serverTime, null), SendMessageOptions.DontRequireReceiver);
return go;
}
else
{
// load prefab, if it wasn't loaded before (calling methods might do this)
if (resourceGameObject == null)
{
if (!NetworkingPeer.UsePrefabCache || !NetworkingPeer.PrefabCache.TryGetValue(prefabName, out resourceGameObject))
{
resourceGameObject = (GameObject)Resources.Load(prefabName, typeof (GameObject));
if (NetworkingPeer.UsePrefabCache)
{
NetworkingPeer.PrefabCache.Add(prefabName, resourceGameObject);
}
}
if (resourceGameObject == null)
{
Debug.LogError("PhotonNetwork error: Could not Instantiate the prefab [" + prefabName + "]. Please verify you have this gameobject in a Resources folder.");
return null;
}
}
// now modify the loaded "blueprint" object before it becomes a part of the scene (by instantiating it)
PhotonView[] resourcePVs = resourceGameObject.GetPhotonViewsInChildren();
if (resourcePVs.Length != viewsIDs.Length)
{
throw new Exception("Error in Instantiation! The resource's PhotonView count is not the same as in incoming data.");
}
for (int i = 0; i < viewsIDs.Length; i++)
{
// NOTE instantiating the loaded resource will keep the viewID but would not copy instantiation data, so it's set below
// so we only set the viewID and instantiationId now. the instantiationData can be fetched
resourcePVs[i].viewID = viewsIDs[i];
resourcePVs[i].prefix = objLevelPrefix;
resourcePVs[i].instantiationId = instantiationId;
resourcePVs[i].isRuntimeInstantiated = true;
}
this.StoreInstantiationData(instantiationId, incomingInstantiationData);
// load the resource and set it's values before instantiating it:
GameObject go = (GameObject)GameObject.Instantiate(resourceGameObject, position, rotation);
for (int i = 0; i < viewsIDs.Length; i++)
{
// NOTE instantiating the loaded resource will keep the viewID but would not copy instantiation data, so it's set below
// so we only set the viewID and instantiationId now. the instantiationData can be fetched
resourcePVs[i].viewID = 0;
resourcePVs[i].prefix = -1;
resourcePVs[i].prefixBackup = -1;
resourcePVs[i].instantiationId = -1;
resourcePVs[i].isRuntimeInstantiated = false;
}
this.RemoveInstantiationData(instantiationId);
// Send OnPhotonInstantiate callback to newly created GO.
// GO will be enabled when instantiated from Prefab and it does not matter if the script is enabled or disabled.
go.SendMessage(PhotonNetworkingMessage.OnPhotonInstantiate.ToString(), new PhotonMessageInfo(photonPlayer, serverTime, null), SendMessageOptions.DontRequireReceiver);
return go;
}
}
private Dictionary<int, object[]> tempInstantiationData = new Dictionary<int, object[]>();
private void StoreInstantiationData(int instantiationId, object[] instantiationData)
{
// Debug.Log("StoreInstantiationData() instantiationId: " + instantiationId + " tempInstantiationData.Count: " + tempInstantiationData.Count);
tempInstantiationData[instantiationId] = instantiationData;
}
public object[] FetchInstantiationData(int instantiationId)
{
object[] data = null;
if (instantiationId == 0)
{
return null;
}
tempInstantiationData.TryGetValue(instantiationId, out data);
// Debug.Log("FetchInstantiationData() instantiationId: " + instantiationId + " tempInstantiationData.Count: " + tempInstantiationData.Count);
return data;
}
private void RemoveInstantiationData(int instantiationId)
{
tempInstantiationData.Remove(instantiationId);
}
/// <summary>
/// Destroys all Instantiates and RPCs locally and (if not localOnly) sends EvDestroy(player) and clears related events in the server buffer.
/// </summary>
public void DestroyPlayerObjects(int playerId, bool localOnly)
{
if (playerId <= 0)
{
Debug.LogError("Failed to Destroy objects of playerId: " + playerId);
return;
}
if (!localOnly)
{
// clean server's Instantiate and RPC buffers
this.OpRemoveFromServerInstantiationsOfPlayer(playerId);
this.OpCleanRpcBuffer(playerId);
// send Destroy(player) to anyone else
this.SendDestroyOfPlayer(playerId);
}
// locally cleaning up that player's objects
HashSet<GameObject> playersGameObjects = new HashSet<GameObject>();
foreach (PhotonView view in this.photonViewList.Values)
{
if (view.CreatorActorNr == playerId)
{
playersGameObjects.Add(view.gameObject);
}
}
// any non-local work is already done, so with the list of that player's objects, we can clean up (locally only)
foreach (GameObject gameObject in playersGameObjects)
{
this.RemoveInstantiatedGO(gameObject, true);
}
// with ownership transfer, some objects might lose their owner.
// in that case, the creator becomes the owner again. every client can apply this. done below.
foreach (PhotonView view in this.photonViewList.Values)
{
if (view.ownerId == playerId)
{
view.ownerId = view.CreatorActorNr;
//Debug.Log("Creator is: " + view.ownerId);
}
}
}
public void DestroyAll(bool localOnly)
{
if (!localOnly)
{
this.OpRemoveCompleteCache();
this.SendDestroyOfAll();
}
this.LocalCleanupAnythingInstantiated(true);
}
/// <summary>Removes GameObject and the PhotonViews on it from local lists and optionally updates remotes. GameObject gets destroyed at end.</summary>
/// <remarks>
/// This method might fail and quit early due to several tests.
/// </remarks>
/// <param name="go">GameObject to cleanup.</param>
/// <param name="localOnly">For localOnly, tests of control are skipped and the server is not updated.</param>
protected internal void RemoveInstantiatedGO(GameObject go, bool localOnly)
{
if (go == null)
{
Debug.LogError("Failed to 'network-remove' GameObject because it's null.");
return;
}
// Don't remove the GO if it doesn't have any PhotonView
PhotonView[] views = go.GetComponentsInChildren<PhotonView>(true);
if (views == null || views.Length <= 0)
{
Debug.LogError("Failed to 'network-remove' GameObject because has no PhotonView components: " + go);
return;
}
PhotonView viewZero = views[0];
int creatorId = viewZero.CreatorActorNr; // creatorId of obj is needed to delete EvInstantiate (only if it's from that user)
int instantiationId = viewZero.instantiationId; // actual, live InstantiationIds start with 1 and go up
// Don't remove GOs that are owned by others (unless this is the master and the remote player left)
if (!localOnly)
{
if (!viewZero.isMine)
{
Debug.LogError("Failed to 'network-remove' GameObject. Client is neither owner nor masterClient taking over for owner who left: " + viewZero);
return;
}
// Don't remove the Instantiation from the server, if it doesn't have a proper ID
if (instantiationId < 1)
{
Debug.LogError("Failed to 'network-remove' GameObject because it is missing a valid InstantiationId on view: " + viewZero + ". Not Destroying GameObject or PhotonViews!");
return;
}
}
// cleanup instantiation (event and local list)
if (!localOnly)
{
this.ServerCleanInstantiateAndDestroy(instantiationId, creatorId, viewZero.isRuntimeInstantiated); // server cleaning
}
// cleanup PhotonViews and their RPCs events (if not localOnly)
for (int j = views.Length - 1; j >= 0; j--)
{
PhotonView view = views[j];
if (view == null)
{
continue;
}
// we only destroy/clean PhotonViews that were created by PhotonNetwork.Instantiate (and those have an instantiationId!)
if (view.instantiationId >= 1)
{
this.LocalCleanPhotonView(view);
}
if (!localOnly)
{
this.OpCleanRpcBuffer(view);
}
}
if (PhotonNetwork.logLevel >= PhotonLogLevel.Full)
{
Debug.Log("Network destroy Instantiated GO: " + go.name);
}
if (this.ObjectPool != null)
{
PhotonView[] photonViews = go.GetPhotonViewsInChildren();
for (int i = 0; i < photonViews.Length; i++)
{
photonViews[i].viewID = 0; // marks the PV as not being in use currently.
}
this.ObjectPool.Destroy(go);
}
else
{
GameObject.Destroy(go);
}
}
/// <summary>
/// This returns -1 if the GO could not be found in list of instantiatedObjects.
/// </summary>
public int GetInstantiatedObjectsId(GameObject go)
{
int id = -1;
if (go == null)
{
Debug.LogError("GetInstantiatedObjectsId() for GO == null.");
return id;
}
PhotonView[] pvs = go.GetPhotonViewsInChildren();
if (pvs != null && pvs.Length > 0 && pvs[0] != null)
{
return pvs[0].instantiationId;
}
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
UnityEngine.Debug.Log("GetInstantiatedObjectsId failed for GO: " + go);
return id;
}
/// <summary>
/// Removes an instantiation event from the server's cache. Needs id and actorNr of player who instantiated.
/// </summary>
private void ServerCleanInstantiateAndDestroy(int instantiateId, int creatorId, bool isRuntimeInstantiated)
{
Hashtable removeFilter = new Hashtable();
removeFilter[(byte)7] = instantiateId;
RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache, TargetActors = new int[] { creatorId } };
this.OpRaiseEvent(PunEvent.Instantiation, removeFilter, true, options);
//this.OpRaiseEvent(PunEvent.Instantiation, removeFilter, true, 0, new int[] { actorNr }, EventCaching.RemoveFromRoomCache);
Hashtable evData = new Hashtable();
evData[(byte)0] = instantiateId;
options = null;
if (!isRuntimeInstantiated)
{
// if the view got loaded with the scene, the EvDestroy must be cached (there is no Instantiate-msg which we can remove)
// reason: joining players will load the obj and have to destroy it (too)
options = new RaiseEventOptions();
options.CachingOption = EventCaching.AddToRoomCacheGlobal;
Debug.Log("Destroying GO as global. ID: " + instantiateId);
}
this.OpRaiseEvent(PunEvent.Destroy, evData, true, options);
}
private void SendDestroyOfPlayer(int actorNr)
{
Hashtable evData = new Hashtable();
evData[(byte)0] = actorNr;
this.OpRaiseEvent(PunEvent.DestroyPlayer, evData, true, null);
//this.OpRaiseEvent(PunEvent.DestroyPlayer, evData, true, 0, EventCaching.DoNotCache, ReceiverGroup.Others);
}
private void SendDestroyOfAll()
{
Hashtable evData = new Hashtable();
evData[(byte)0] = -1;
this.OpRaiseEvent(PunEvent.DestroyPlayer, evData, true, null);
//this.OpRaiseEvent(PunEvent.DestroyPlayer, evData, true, 0, EventCaching.DoNotCache, ReceiverGroup.Others);
}
private void OpRemoveFromServerInstantiationsOfPlayer(int actorNr)
{
// removes all "Instantiation" events of player actorNr. this is not an event for anyone else
RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache, TargetActors = new int[] { actorNr } };
this.OpRaiseEvent(PunEvent.Instantiation, null, true, options);
//this.OpRaiseEvent(PunEvent.Instantiation, null, true, 0, new int[] { actorNr }, EventCaching.RemoveFromRoomCache);
}
internal protected void RequestOwnership(int viewID, int fromOwner)
{
Debug.Log("RequestOwnership(): " + viewID + " from: " + fromOwner + " Time: " + Environment.TickCount % 1000);
//PhotonNetwork.networkingPeer.OpRaiseEvent(PunEvent.OwnershipRequest, true, new int[] { viewID, fromOwner }, 0, EventCaching.DoNotCache, null, ReceiverGroup.All, 0);
this.OpRaiseEvent(PunEvent.OwnershipRequest, new int[] {viewID, fromOwner}, true, new RaiseEventOptions() { Receivers = ReceiverGroup.All }); // All sends to all via server (including self)
}
internal protected void TransferOwnership(int viewID, int playerID)
{
Debug.Log("TransferOwnership() view " + viewID + " to: " + playerID + " Time: " + Environment.TickCount % 1000);
//PhotonNetwork.networkingPeer.OpRaiseEvent(PunEvent.OwnershipTransfer, true, new int[] {viewID, playerID}, 0, EventCaching.DoNotCache, null, ReceiverGroup.All, 0);
this.OpRaiseEvent(PunEvent.OwnershipTransfer, new int[] { viewID, playerID }, true, new RaiseEventOptions() { Receivers = ReceiverGroup.All }); // All sends to all via server (including self)
}
public bool LocalCleanPhotonView(PhotonView view)
{
view.removedFromLocalViewList = true;
return this.photonViewList.Remove(view.viewID);
}
public PhotonView GetPhotonView(int viewID)
{
PhotonView result = null;
this.photonViewList.TryGetValue(viewID, out result);
if (result == null)
{
PhotonView[] views = GameObject.FindObjectsOfType(typeof(PhotonView)) as PhotonView[];
foreach (PhotonView view in views)
{
if (view.viewID == viewID)
{
if (view.didAwake)
{
Debug.LogWarning("Had to lookup view that wasn't in photonViewList: " + view);
}
return view;
}
}
}
return result;
}
public void RegisterPhotonView(PhotonView netView)
{
if (!Application.isPlaying)
{
this.photonViewList = new Dictionary<int, PhotonView>();
return;
}
if (netView.viewID == 0)
{
// don't register views with ID 0 (not initialized). they register when a ID is assigned later on
Debug.Log("PhotonView register is ignored, because viewID is 0. No id assigned yet to: " + netView);
return;
}
PhotonView listedView = null;
bool isViewListed = this.photonViewList.TryGetValue(netView.viewID, out listedView);
if (isViewListed)
{
// if some other view is in the list already, we got a problem. it might be undestructible. print out error
if (netView != listedView)
{
Debug.LogError(string.Format("PhotonView ID duplicate found: {0}. New: {1} old: {2}. Maybe one wasn't destroyed on scene load?! Check for 'DontDestroyOnLoad'. Destroying old entry, adding new.", netView.viewID, netView, listedView));
}
else
{
return;
}
this.RemoveInstantiatedGO(listedView.gameObject, true);
}
// Debug.Log("adding view to known list: " + netView);
this.photonViewList.Add(netView.viewID, netView);
//Debug.LogError("view being added. " + netView); // Exit Games internal log
if (PhotonNetwork.logLevel >= PhotonLogLevel.Full)
{
Debug.Log("Registered PhotonView: " + netView.viewID);
}
}
///// <summary>
///// Will remove the view from list of views (by its ID).
///// </summary>
//public void RemovePhotonView(PhotonView netView)
//{
// if (!Application.isPlaying)
// {
// this.photonViewList = new Dictionary<int, PhotonView>();
// return;
// }
// //PhotonView removedView = null;
// //this.photonViewList.TryGetValue(netView.viewID, out removedView);
// //if (removedView != netView)
// //{
// // Debug.LogError("Detected two differing PhotonViews with same viewID: " + netView.viewID);
// //}
// this.photonViewList.Remove(netView.viewID);
// //if (this.DebugOut >= DebugLevel.ALL)
// //{
// // this.DebugReturn(DebugLevel.ALL, "Removed PhotonView: " + netView.viewID);
// //}
//}
/// <summary>
/// Removes the RPCs of someone else (to be used as master).
/// This won't clean any local caches. It just tells the server to forget a player's RPCs and instantiates.
/// </summary>
/// <param name="actorNumber"></param>
public void OpCleanRpcBuffer(int actorNumber)
{
RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache, TargetActors = new int[] { actorNumber } };
this.OpRaiseEvent(PunEvent.RPC, null, true, options);
//this.OpRaiseEvent(PunEvent.RPC, null, true, 0, new int[] { actorNumber }, EventCaching.RemoveFromRoomCache);
}
/// <summary>
/// Instead removing RPCs or Instantiates, this removed everything cached by the actor.
/// </summary>
/// <param name="actorNumber"></param>
public void OpRemoveCompleteCacheOfPlayer(int actorNumber)
{
RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache, TargetActors = new int[] { actorNumber } };
this.OpRaiseEvent(0, null, true, options);
//this.OpRaiseEvent(0, null, true, 0, new int[] { actorNumber }, EventCaching.RemoveFromRoomCache);
}
public void OpRemoveCompleteCache()
{
RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache, Receivers = ReceiverGroup.MasterClient };
this.OpRaiseEvent(0, null, true, options);
//this.OpRaiseEvent(0, null, true, 0, EventCaching.RemoveFromRoomCache, ReceiverGroup.MasterClient); // TODO: check who gets this event?
}
/// This clears the cache of any player/actor who's no longer in the room (making it a simple clean-up option for a new master)
private void RemoveCacheOfLeftPlayers()
{
Dictionary<byte, object> opParameters = new Dictionary<byte, object>();
opParameters[ParameterCode.Code] = (byte)0; // any event
opParameters[ParameterCode.Cache] = (byte)EventCaching.RemoveFromRoomCacheForActorsLeft; // option to clear the room cache of all events of players who left
this.OpCustom((byte)OperationCode.RaiseEvent, opParameters, true, 0);
}
// Remove RPCs of view (if they are local player's RPCs)
public void CleanRpcBufferIfMine(PhotonView view)
{
if (view.ownerId != this.mLocalActor.ID && !mLocalActor.isMasterClient)
{
Debug.LogError("Cannot remove cached RPCs on a PhotonView thats not ours! " + view.owner + " scene: " + view.isSceneView);
return;
}
this.OpCleanRpcBuffer(view);
}
/// <summary>Cleans server RPCs for PhotonView (without any further checks).</summary>
public void OpCleanRpcBuffer(PhotonView view)
{
Hashtable rpcFilterByViewId = new Hashtable();
rpcFilterByViewId[(byte)0] = view.viewID;
RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache };
this.OpRaiseEvent(PunEvent.RPC, rpcFilterByViewId, true, options);
//this.OpRaiseEvent(PunEvent.RPC, rpcFilterByViewId, true, 0, EventCaching.RemoveFromRoomCache, ReceiverGroup.Others);
}
public void RemoveRPCsInGroup(int group)
{
foreach (KeyValuePair<int, PhotonView> kvp in this.photonViewList)
{
PhotonView view = kvp.Value;
if (view.group == group)
{
this.CleanRpcBufferIfMine(view);
}
}
}
public void SetLevelPrefix(short prefix)
{
this.currentLevelPrefix = prefix;
// TODO: should we really change the prefix for existing PVs?! better keep it!
//foreach (PhotonView view in this.photonViewList.Values)
//{
// view.prefix = prefix;
//}
}
internal void RPC(PhotonView view, string methodName, PhotonPlayer player, bool encrypt, params object[] parameters)
{
if (this.blockSendingGroups.Contains(view.group))
{
return; // Block sending on this group
}
if (view.viewID < 1) //TODO: check why 0 should be illegal
{
Debug.LogError("Illegal view ID:" + view.viewID + " method: " + methodName + " GO:" + view.gameObject.name);
}
if (PhotonNetwork.logLevel >= PhotonLogLevel.Full)
{
Debug.Log("Sending RPC \"" + methodName + "\" to player[" + player + "]");
}
//ts: changed RPCs to a one-level hashtable as described in internal.txt
object[] rpcEvent = new object[6];
rpcEvent[(byte)0] = (int)view.viewID; // LIMITS PHOTONVIEWS&PLAYERS
if (view.prefix > 0)
{
rpcEvent[(byte)1] = (short)view.prefix;
}
rpcEvent[(byte)2] = this.ServerTimeInMilliSeconds;
// send name or shortcut (if available)
int shortcut = 0;
if (rpcShortcuts.TryGetValue(methodName, out shortcut))
{
rpcEvent[(byte)5] = (byte)shortcut; // LIMITS RPC COUNT
}
else
{
rpcEvent[(byte)3] = methodName;
}
if (parameters != null && parameters.Length > 0)
{
rpcEvent[(byte) 4] = (object[]) parameters;
}
if (this.mLocalActor.ID == player.ID)
{
this.ExecuteRpc(rpcEvent, player);
}
else
{
RaiseEventOptions options = new RaiseEventOptions() { TargetActors = new int[] { player.ID }, Encrypt = encrypt };
this.OpRaiseEvent(PunEvent.RPC, rpcEvent, true, options);
}
}
/// RPC Definition
/// RPCs are sent as object[] (PUN v1.66 and up)
/// Values that are not used, are null
///
/// (byte)0 -> (int) ViewId (combined from actorNr and actor-unique-id)
/// (byte)1 -> (short) prefix (level)
/// (byte)2 -> (int) server timestamp
/// (byte)3 -> (string) methodname
/// (byte)4 -> (object[]) parameters
/// (byte)5 -> (byte) method shortcut (alternative to name)
///
/// This is sent as event (code: 200) which will contain a sender (origin of this RPC).
internal void RPC(PhotonView view, string methodName, PhotonTargets target, bool encrypt, params object[] parameters)
{
if (this.blockSendingGroups.Contains(view.group))
{
return; // Block sending on this group
}
if (view.viewID < 1)
{
Debug.LogError("Illegal view ID:" + view.viewID + " method: " + methodName + " GO:" + view.gameObject.name);
}
if (PhotonNetwork.logLevel >= PhotonLogLevel.Full)
Debug.Log("Sending RPC \"" + methodName + "\" to " + target);
// in v1.66 this was changed to a object[]
object[] rpcEvent = new object[6];
rpcEvent[(byte)0] = (int)view.viewID; // LIMITS NETWORKVIEWS&PLAYERS
if (view.prefix > 0)
{
rpcEvent[(byte)1] = (short)view.prefix;
}
rpcEvent[(byte)2] = this.ServerTimeInMilliSeconds;
// send name or shortcut (if available)
int shortcut = 0;
if (rpcShortcuts.TryGetValue(methodName, out shortcut))
{
rpcEvent[(byte)5] = (byte)shortcut; // LIMITS RPC COUNT
}
else
{
rpcEvent[(byte)3] = methodName;
}
if (parameters != null && parameters.Length > 0)
{
rpcEvent[(byte)4] = (object[])parameters;
}
// Check scoping
if (target == PhotonTargets.All)
{
RaiseEventOptions options = new RaiseEventOptions() { InterestGroup = (byte)view.group, Encrypt = encrypt };
this.OpRaiseEvent(PunEvent.RPC, rpcEvent, true, options);
// Execute local
this.ExecuteRpc(rpcEvent, this.mLocalActor);
}
else if (target == PhotonTargets.Others)
{
RaiseEventOptions options = new RaiseEventOptions() { InterestGroup = (byte)view.group, Encrypt = encrypt };
this.OpRaiseEvent(PunEvent.RPC, rpcEvent, true, options);
}
else if (target == PhotonTargets.AllBuffered)
{
RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.AddToRoomCache, Encrypt = encrypt };
this.OpRaiseEvent(PunEvent.RPC, rpcEvent, true, options);
// Execute local
this.ExecuteRpc(rpcEvent, this.mLocalActor);
}
else if (target == PhotonTargets.OthersBuffered)
{
RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.AddToRoomCache, Encrypt = encrypt };
this.OpRaiseEvent(PunEvent.RPC, rpcEvent, true, options);
}
else if (target == PhotonTargets.MasterClient)
{
if (this.mMasterClientId == this.mLocalActor.ID)
{
this.ExecuteRpc(rpcEvent, this.mLocalActor);
}
else
{
RaiseEventOptions options = new RaiseEventOptions() { Receivers = ReceiverGroup.MasterClient, Encrypt = encrypt };
this.OpRaiseEvent(PunEvent.RPC, rpcEvent, true, options);
}
}
else if (target == PhotonTargets.AllViaServer)
{
RaiseEventOptions options = new RaiseEventOptions() { InterestGroup = (byte)view.group, Receivers = ReceiverGroup.All, Encrypt = encrypt };
this.OpRaiseEvent(PunEvent.RPC, rpcEvent, true, options);
if (PhotonNetwork.offlineMode)
{
this.ExecuteRpc(rpcEvent, this.mLocalActor);
}
}
else if (target == PhotonTargets.AllBufferedViaServer)
{
RaiseEventOptions options = new RaiseEventOptions() { InterestGroup = (byte)view.group, Receivers = ReceiverGroup.All, CachingOption = EventCaching.AddToRoomCache, Encrypt = encrypt };
this.OpRaiseEvent(PunEvent.RPC, rpcEvent, true, options);
if (PhotonNetwork.offlineMode)
{
this.ExecuteRpc(rpcEvent, this.mLocalActor);
}
}
else
{
Debug.LogError("Unsupported target enum: " + target);
}
}
// SetReceiving
public void SetReceivingEnabled(int group, bool enabled)
{
if (group <= 0)
{
Debug.LogError("Error: PhotonNetwork.SetReceivingEnabled was called with an illegal group number: " + group + ". The group number should be at least 1.");
return;
}
if (enabled)
{
if (!this.allowedReceivingGroups.Contains(group))
{
this.allowedReceivingGroups.Add(group);
byte[] groups = new byte[1] { (byte)group };
this.OpChangeGroups(null, groups);
}
}
else
{
if (this.allowedReceivingGroups.Contains(group))
{
this.allowedReceivingGroups.Remove(group);
byte[] groups = new byte[1] { (byte)group };
this.OpChangeGroups(groups, null);
}
}
}
public void SetReceivingEnabled(int[] enableGroups, int[] disableGroups)
{
List<byte> enableList = new List<byte>();
List<byte> disableList = new List<byte>();
if (enableGroups != null)
{
for (int index = 0; index < enableGroups.Length; index++)
{
int i = enableGroups[index];
if (i <= 0)
{
Debug.LogError("Error: PhotonNetwork.SetReceivingEnabled was called with an illegal group number: " + i + ". The group number should be at least 1.");
continue;
}
if (!this.allowedReceivingGroups.Contains(i))
{
this.allowedReceivingGroups.Add(i);
enableList.Add((byte)i);
}
}
}
if (disableGroups != null)
{
for (int index = 0; index < disableGroups.Length; index++)
{
int i = disableGroups[index];
if (i <= 0)
{
Debug.LogError("Error: PhotonNetwork.SetReceivingEnabled was called with an illegal group number: " + i + ". The group number should be at least 1.");
continue;
}
if (enableList.Contains((byte)i))
{
Debug.LogError("Error: PhotonNetwork.SetReceivingEnabled disableGroups contains a group that is also in the enableGroups: " + i + ".");
continue;
}
if (this.allowedReceivingGroups.Contains(i))
{
this.allowedReceivingGroups.Remove(i);
disableList.Add((byte)i);
}
}
}
this.OpChangeGroups(disableList.Count > 0 ? disableList.ToArray() : null, enableList.Count > 0 ? enableList.ToArray() : null); //Passing a 0 sized array != passing null
}
// SetSending
public void SetSendingEnabled(int group, bool enabled)
{
if (!enabled)
{
this.blockSendingGroups.Add(group); // can be added to HashSet no matter if already in it
}
else
{
this.blockSendingGroups.Remove(group);
}
}
public void SetSendingEnabled(int[] enableGroups, int[] disableGroups)
{
if(enableGroups!=null){
foreach(int i in enableGroups){
if(this.blockSendingGroups.Contains(i))
this.blockSendingGroups.Remove(i);
}
}
if(disableGroups!=null){
foreach(int i in disableGroups){
if(!this.blockSendingGroups.Contains(i))
this.blockSendingGroups.Add(i);
}
}
}
public void NewSceneLoaded()
{
if (this.loadingLevelAndPausedNetwork)
{
this.loadingLevelAndPausedNetwork = false;
PhotonNetwork.isMessageQueueRunning = true;
}
// Debug.Log("OnLevelWasLoaded photonViewList.Count: " + photonViewList.Count); // Exit Games internal log
List<int> removeKeys = new List<int>();
foreach (KeyValuePair<int, PhotonView> kvp in this.photonViewList)
{
PhotonView view = kvp.Value;
if (view == null)
{
removeKeys.Add(kvp.Key);
}
}
for (int index = 0; index < removeKeys.Count; index++)
{
int key = removeKeys[index];
this.photonViewList.Remove(key);
}
if (removeKeys.Count > 0)
{
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
Debug.Log("New level loaded. Removed " + removeKeys.Count + " scene view IDs from last level.");
}
}
// this is called by Update() and in Unity that means it's single threaded.
public void RunViewUpdate()
{
if (!PhotonNetwork.connected || PhotonNetwork.offlineMode)
{
return;
}
if (this.mActors == null ||
#if !PHOTON_DEVELOP
this.mActors.Count <= 1
#endif
)
{
return; // No need to send OnSerialize messages (these are never buffered anyway)
}
dataPerGroupReliable.Clear();
dataPerGroupUnreliable.Clear();
/* Format of the data hashtable:
* Hasthable dataPergroup*
* [(byte)0] = this.ServerTimeInMilliSeconds;
* OPTIONAL: [(byte)1] = currentLevelPrefix;
* + data
*/
foreach (KeyValuePair<int, PhotonView> kvp in this.photonViewList)
{
PhotonView view = kvp.Value;
if (view.synchronization != ViewSynchronization.Off)
{
// Fetch all sending photonViews
if (view.isMine)
{
#if UNITY_2_6_1 || UNITY_2_6 || UNITY_3_0 || UNITY_3_0_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5
if (!view.gameObject.active)
{
continue; // Only on actives
}
#else
if (!view.gameObject.activeInHierarchy)
{
continue; // Only on actives
}
#endif
if (this.blockSendingGroups.Contains(view.group))
{
continue; // Block sending on this group
}
// Run it trough its OnSerialize
object[] evData = this.OnSerializeWrite(view);
if (evData == null)
{
continue;
}
if (view.synchronization == ViewSynchronization.ReliableDeltaCompressed || view.mixedModeIsReliable)
{
Hashtable groupHashtable = null;
bool found = dataPerGroupReliable.TryGetValue(view.group, out groupHashtable);
if (!found)
{
groupHashtable = new Hashtable(4);
groupHashtable[(byte)0] = this.ServerTimeInMilliSeconds;
if (currentLevelPrefix >= 0)
{
groupHashtable[(byte)1] = this.currentLevelPrefix;
}
dataPerGroupReliable[view.group] = groupHashtable;
}
groupHashtable.Add((short)groupHashtable.Count, evData);
}
else
{
Hashtable groupHashtable = null;
bool found = dataPerGroupUnreliable.TryGetValue(view.group, out groupHashtable);
if (!found)
{
groupHashtable = new Hashtable(4);
groupHashtable[(byte)0] = this.ServerTimeInMilliSeconds;
if (currentLevelPrefix >= 0)
{
groupHashtable[(byte)1] = this.currentLevelPrefix;
}
dataPerGroupUnreliable[view.group] = groupHashtable;
}
groupHashtable.Add((short)groupHashtable.Count, evData);
}
}
else
{
// Debug.Log(" NO OBS on " + view.name + " " + view.owner);
}
}
else
{
}
}
//Send the messages: every group is send in it's own message and unreliable and reliable are split as well
RaiseEventOptions options = new RaiseEventOptions();
#if PHOTON_DEVELOP
options.Receivers = ReceiverGroup.All;
#endif
foreach (KeyValuePair<int, Hashtable> kvp in dataPerGroupReliable)
{
options.InterestGroup = (byte)kvp.Key;
this.OpRaiseEvent(PunEvent.SendSerializeReliable, kvp.Value, true, options);
}
foreach (KeyValuePair<int, Hashtable> kvp in dataPerGroupUnreliable)
{
options.InterestGroup = (byte)kvp.Key;
this.OpRaiseEvent(PunEvent.SendSerialize, kvp.Value, false, options);
}
}
// calls OnPhotonSerializeView (through ExecuteOnSerialize)
// the content created here is consumed by receivers in: ReadOnSerialize
private object[] OnSerializeWrite(PhotonView view)
{
if (view.synchronization == ViewSynchronization.Off)
{
return null;
}
// each view creates a list of values that should be sent
PhotonMessageInfo info = new PhotonMessageInfo(this.mLocalActor, this.ServerTimeInMilliSeconds, view);
PhotonStream pStream = new PhotonStream(true, null);
pStream.SendNext((int)view.viewID);
pStream.SendNext(false);
pStream.SendNext(null);
view.SerializeView(pStream, info);
// check if there are actual values to be sent (after the "header" of viewId, (bool)compressed and (int[])nullValues)
if(pStream.Count <= SyncFirstValue)
{
return null;
}
if (view.synchronization == ViewSynchronization.Unreliable)
{
return pStream.ToArray();
}
// ViewSynchronization: Off, Unreliable, UnreliableOnChange, ReliableDeltaCompressed
object[] currentValues = pStream.ToArray();
if (view.synchronization == ViewSynchronization.UnreliableOnChange)
{
if (AlmostEquals(currentValues, view.lastOnSerializeDataSent))
{
if (view.mixedModeIsReliable)
{
return null;
}
view.mixedModeIsReliable = true;
view.lastOnSerializeDataSent = currentValues;
}
else
{
view.mixedModeIsReliable = false;
view.lastOnSerializeDataSent = currentValues;
}
return currentValues;
}
if (view.synchronization == ViewSynchronization.ReliableDeltaCompressed)
{
// compress content of data set (by comparing to view.lastOnSerializeDataSent)
// the "original" dataArray is NOT modified by DeltaCompressionWrite
object[] dataToSend = this.DeltaCompressionWrite(view.lastOnSerializeDataSent, currentValues);
// cache the values that were written this time (not the compressed values)
view.lastOnSerializeDataSent = currentValues;
return dataToSend;
}
return null;
}
string LogObjectArray(object[] data)
{
string[] sb = new string[data.Length];
for (int i = 0; i < data.Length; i++)
{
object o = data[i];
sb[i] = (o != null) ? o.ToString() : "null";
}
return string.Join(", ",sb);
}
/// <summary>
/// Reads updates created by OnSerializeWrite
/// </summary>
private void OnSerializeRead(object[] data, PhotonPlayer sender, int networkTime, short correctPrefix)
{
// read view ID from key (byte)0: a int-array (PUN 1.17++)
int viewID = (int)data[SyncViewId];
// debug:
//LogObjectArray(data);
PhotonView view = this.GetPhotonView(viewID);
if (view == null)
{
Debug.LogWarning("Received OnSerialization for view ID " + viewID + ". We have no such PhotonView! Ignored this if you're leaving a room. State: " + this.State);
return;
}
if (view.prefix > 0 && correctPrefix != view.prefix)
{
Debug.LogError("Received OnSerialization for view ID " + viewID + " with prefix " + correctPrefix + ". Our prefix is " + view.prefix);
return;
}
// SetReceiving filtering
if (view.group != 0 && !this.allowedReceivingGroups.Contains(view.group))
{
return; // Ignore group
}
if (view.synchronization == ViewSynchronization.ReliableDeltaCompressed)
{
object[] uncompressed = this.DeltaCompressionRead(view.lastOnSerializeDataReceived, data);
//LogObjectArray(uncompressed,"uncompressed ");
if (uncompressed == null)
{
// Skip this packet as we haven't got received complete-copy of this view yet.
if (PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
{
Debug.Log("Skipping packet for " + view.name + " [" + view.viewID + "] as we haven't received a full packet for delta compression yet. This is OK if it happens for the first few frames after joining a game.");
}
return;
}
// store last received values (uncompressed) for delta-compression usage
view.lastOnSerializeDataReceived = uncompressed;
data = uncompressed;
}
// TODO: check if we really want to set the owner of a GO, based on who sends something about it.
// this has nothing to do with reading the actual synchronization update.
if (sender.ID != view.ownerId)
{
if (!view.isSceneView || !sender.isMasterClient)
{
// obviously the owner changed and we didn't yet notice.
Debug.Log("Adjusting owner to sender of updates. From: " + view.ownerId + " to: " + sender.ID);
view.ownerId = sender.ID;
}
}
PhotonStream pStream = new PhotonStream(false, data);
pStream.currentItem = 3;
PhotonMessageInfo info = new PhotonMessageInfo(sender, networkTime, view);
view.DeserializeView(pStream, info);
}
private bool AlmostEquals(object[] lastData, object[] currentContent)
{
if (lastData == null && currentContent == null)
{
return true;
}
if (lastData == null || currentContent == null || (lastData.Length != currentContent.Length))
{
return false;
}
for (int index = 0; index < currentContent.Length; index++)
{
object newObj = currentContent[index];
object oldObj = lastData[index];
if (!this.ObjectIsSameWithInprecision(newObj, oldObj))
{
return false;
}
}
return true;
}
// compresses currentContent array into containing NULL, where currentContent equals previousContent
// skips initial indexes, as defined by startIndex
// returns null, if nothing must be sent (current content might be null, which also returns null)
// startIndex should be the index of the first actual data-value (3 in PUN's case, as 0=viewId, 1=(bool)compressed, 2=(int[])values that are now null)
private object[] DeltaCompressionWrite(object[] previousContent, object[] currentContent)
{
if (currentContent == null || previousContent == null || previousContent.Length != currentContent.Length)
{
return currentContent; // the current data needs to be sent (which might be null)
}
if (currentContent.Length <= SyncFirstValue)
{
return null; // this send doesn't contain values (except the "headers"), so it's not being sent
}
object[] compressedContent = new object[currentContent.Length];
compressedContent[SyncCompressed] = false;
int compressedValues = 0;
HashSet<int> valuesThatAreChangedToNull = new HashSet<int>();
for (int index = SyncFirstValue; index < currentContent.Length; index++)
{
object newObj = currentContent[index];
object oldObj = previousContent[index];
if (this.ObjectIsSameWithInprecision(newObj, oldObj))
{
// compress (by using null, instead of value, which is same as before)
compressedValues++;
// compressedContent[index] is already null (initialized)
}
else
{
compressedContent[index] = newObj;
// value changed, we don't replace it with null
// new value is null (like a compressed value): we have to mark it so it STAYS null instead of being replaced with previous value
if (newObj == null)
{
valuesThatAreChangedToNull.Add(index);
}
}
}
// Only send the list of compressed fields if we actually compressed 1 or more fields.
if (compressedValues > 0)
{
if (compressedValues == currentContent.Length - SyncFirstValue)
{
// all values are compressed to null, we have nothing to send
return null;
}
compressedContent[SyncCompressed] = true;
if (valuesThatAreChangedToNull.Count > 0)
{
compressedContent[SyncNullValues] = valuesThatAreChangedToNull.ToArray(); // data that is actually null (not just cause we didn't want to send it)
}
}
compressedContent[SyncViewId] = currentContent[SyncViewId];
return compressedContent; // some data was compressed but we need to send something
}
public const int SyncViewId = 0;
public const int SyncCompressed = 1;
public const int SyncNullValues = 2;
public const int SyncFirstValue = 3;
// startIndex should be the index of the first actual data-value (3 in PUN's case, as 0=viewId, 1=(bool)compressed, 2=(int[])values that are now null)
// returns the incomingData with modified content. any object being null (means: value unchanged) gets replaced with a previously sent value. incomingData is being modified
private object[] DeltaCompressionRead(object[] lastOnSerializeDataReceived, object[] incomingData)
{
if ((bool)incomingData[SyncCompressed] == false)
{
// index 1 marks "compressed" as being true.
return incomingData;
}
// Compression was applied (as data[1] == true)
// we need a previous "full" list of values to restore values that are null in this msg. else, ignore this
if (lastOnSerializeDataReceived == null)
{
return null;
}
int[] indexesThatAreChangedToNull = incomingData[(byte)2] as int[];
for (int index = SyncFirstValue; index < incomingData.Length; index++)
{
if (indexesThatAreChangedToNull != null && indexesThatAreChangedToNull.Contains(index))
{
continue; // if a value was set to null in this update, we don't need to fetch it from an earlier update
}
if (incomingData[index] == null)
{
// we replace null values in this received msg unless a index is in the "changed to null" list
object lastValue = lastOnSerializeDataReceived[index];
incomingData[index] = lastValue;
}
}
return incomingData;
}
/// <summary>
/// Returns true if both objects are almost identical.
/// Used to check whether two objects are similar enough to skip an update.
/// </summary>
bool ObjectIsSameWithInprecision(object one, object two)
{
if (one == null || two == null)
{
return one == null && two == null;
}
if (!one.Equals(two))
{
// if A is not B, lets check if A is almost B
if (one is Vector3)
{
Vector3 a = (Vector3)one;
Vector3 b = (Vector3)two;
if (a.AlmostEquals(b, PhotonNetwork.precisionForVectorSynchronization))
{
return true;
}
}
else if (one is Vector2)
{
Vector2 a = (Vector2)one;
Vector2 b = (Vector2)two;
if (a.AlmostEquals(b, PhotonNetwork.precisionForVectorSynchronization))
{
return true;
}
}
else if (one is Quaternion)
{
Quaternion a = (Quaternion)one;
Quaternion b = (Quaternion)two;
if (a.AlmostEquals(b, PhotonNetwork.precisionForQuaternionSynchronization))
{
return true;
}
}
else if (one is float)
{
float a = (float)one;
float b = (float)two;
if (a.AlmostEquals(b, PhotonNetwork.precisionForFloatSynchronization))
{
return true;
}
}
// one does not equal two
return false;
}
return true;
}
internal protected static bool GetMethod(MonoBehaviour monob, string methodType, out MethodInfo mi)
{
mi = null;
if (monob == null || string.IsNullOrEmpty(methodType))
{
return false;
}
List<MethodInfo> methods = SupportClass.GetMethods(monob.GetType(), null);
for (int index = 0; index < methods.Count; index++)
{
MethodInfo methodInfo = methods[index];
if (methodInfo.Name.Equals(methodType))
{
mi = methodInfo;
return true;
}
}
return false;
}
/// <summary>Internally used to detect the current scene and load it if PhotonNetwork.automaticallySyncScene is enabled.</summary>
internal protected void LoadLevelIfSynced()
{
if (!PhotonNetwork.automaticallySyncScene || PhotonNetwork.isMasterClient || PhotonNetwork.room == null)
{
return;
}
// check if "current level" is set in props
if (!PhotonNetwork.room.customProperties.ContainsKey(NetworkingPeer.CurrentSceneProperty))
{
return;
}
// if loaded level is not the one defined my master in props, load that level
object sceneId = PhotonNetwork.room.customProperties[NetworkingPeer.CurrentSceneProperty];
if (sceneId is int)
{
if (SceneManagerHelper.ActiveSceneBuildIndex != (int)sceneId)
PhotonNetwork.LoadLevel((int)sceneId);
}
else if (sceneId is string)
{
if (SceneManagerHelper.ActiveSceneName != (string)sceneId)
PhotonNetwork.LoadLevel((string)sceneId);
}
}
protected internal void SetLevelInPropsIfSynced(object levelId)
{
if (!PhotonNetwork.automaticallySyncScene || !PhotonNetwork.isMasterClient || PhotonNetwork.room == null)
{
return;
}
if (levelId == null)
{
Debug.LogError("Parameter levelId can't be null!");
return;
}
// check if "current level" is already set in props
if (PhotonNetwork.room.customProperties.ContainsKey(NetworkingPeer.CurrentSceneProperty))
{
object levelIdInProps = PhotonNetwork.room.customProperties[NetworkingPeer.CurrentSceneProperty];
if (levelIdInProps is int && SceneManagerHelper.ActiveSceneBuildIndex == (int)levelIdInProps)
{
return;
}
if (levelIdInProps is string && SceneManagerHelper.ActiveSceneName != null && SceneManagerHelper.ActiveSceneName.Equals((string)levelIdInProps))
{
return;
}
}
// current level is not yet in props, so this client has to set it
Hashtable setScene = new Hashtable();
if (levelId is int) setScene[NetworkingPeer.CurrentSceneProperty] = (int)levelId;
else if (levelId is string) setScene[NetworkingPeer.CurrentSceneProperty] = (string)levelId;
else Debug.LogError("Parameter levelId must be int or string!");
PhotonNetwork.room.SetCustomProperties(setScene);
this.SendOutgoingCommands(); // send immediately! because: in most cases the client will begin to load and not send for a while
}
public void SetApp(string appId, string gameVersion)
{
this.mAppId = appId.Trim();
if (!string.IsNullOrEmpty(gameVersion))
{
PhotonNetwork.gameVersion = gameVersion.Trim();
}
}
public bool WebRpc(string uriPath, object parameters)
{
Dictionary<byte, object> opParameters = new Dictionary<byte, object>();
opParameters.Add(ParameterCode.UriPath, uriPath);
opParameters.Add(ParameterCode.WebRpcParameters, parameters);
return this.OpCustom(OperationCode.WebRpc, opParameters, true);
}
}
| 41.781242 | 334 | 0.563142 | [
"MIT"
] | wendellpbarreto/glitch | Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs | 164,829 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using dotnetcorecrud.DomainModel;
using dotnetcorecrud.Processors;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
namespace dotnetcorecrud.Controllers
{
[Route("api/[controller]")]
public class PeopleController : Controller
{
private readonly TimeSpan DefaultMemoryCacheExpiration = TimeSpan.FromSeconds(24 * 3600);
private IMemoryCache _memoryCache;
private readonly IPeopleProcessor _peopleProcessor;
public PeopleController(IMemoryCache memoryCache, IPeopleProcessor peopleProcessor)
{
_memoryCache = memoryCache;
_peopleProcessor = peopleProcessor;
}
// GET api/people/all
[HttpGet("all")]
public IEnumerable<People> GetAll()
{
IEnumerable<People> result = _peopleProcessor.GetAllPeople();
return result;
}
// GET api/people/batch/<jobKey>
[HttpGet("batch/{jobKey}")]
public IActionResult GetBatchJobStatus(string jobKey)
{
JobResult jobResult;
IActionResult actionResult = NoContent();
bool isValid = _memoryCache.TryGetValue<JobResult>(Guid.Parse(jobKey), out jobResult);
if (isValid)
{
actionResult = Ok(jobResult);
}
return actionResult;
}
// GET api/people/<peopleKey>
[HttpGet("{peopleKey}")]
public People GetPerson(string peopleKey)
{
People result = _peopleProcessor.GetPerson(Guid.Parse(peopleKey));
return result;
}
// POST api/people
[HttpPost]
public IActionResult Post([FromBody]string personName)
{
People result = _peopleProcessor.CreatePerson(personName);
return Created("api/people", result);
}
// POST api/people/batch
[HttpPost("batch")]
public IActionResult BatchPost([FromBody]IEnumerable<string> peopleNames)
{
Guid jobKey = _peopleProcessor.BatchCreatePeople(peopleNames);
IDictionary<string, string> responseDict = new Dictionary<string, string>();
responseDict.Add("JobKey", jobKey.ToString());
var cacheEntryOptions =
new MemoryCacheEntryOptions().SetSlidingExpiration(DefaultMemoryCacheExpiration);
_memoryCache.Set(jobKey, new JobResult("POST", false), cacheEntryOptions);
return Accepted(responseDict);
}
// PUT api/people
[HttpPut]
public People Put([FromBody]People person)
{
People result = _peopleProcessor.UpdatePerson(person);
return result;
}
// PUT api/people/batch
[HttpPut("batch")]
public IActionResult BatchPut([FromBody]IEnumerable<People> people)
{
Guid jobKey = _peopleProcessor.BatchUpdatePeople(people);
IDictionary<string, string> responseDict = new Dictionary<string, string>();
responseDict.Add("JobKey", jobKey.ToString());
var cacheEntryOptions =
new MemoryCacheEntryOptions().SetSlidingExpiration(DefaultMemoryCacheExpiration);
_memoryCache.Set(jobKey, new JobResult("PUT", false), cacheEntryOptions);
return Accepted(responseDict);
}
// DELETE api/people/<peopleKey>
[HttpDelete("{key}")]
public People Delete(string peopleKey)
{
People person = _peopleProcessor.DeletePerson(Guid.Parse(peopleKey));
return person;
}
// DELETE api/people/batch
[HttpDelete("batch")]
public IActionResult BatchDelete([FromBody]IEnumerable<string> peopleKeys)
{
Guid jobKey =
_peopleProcessor.BatchDeletePeople(peopleKeys.Select(x => Guid.Parse(x)));
IDictionary<string, string> responseDict = new Dictionary<string, string>();
responseDict.Add("JobKey", jobKey.ToString());
var cacheEntryOptions =
new MemoryCacheEntryOptions().SetSlidingExpiration(DefaultMemoryCacheExpiration);
_memoryCache.Set(jobKey, new JobResult("DELETE", false), cacheEntryOptions);
return Accepted(responseDict);
}
}
}
| 32.626761 | 99 | 0.597885 | [
"Unlicense"
] | andremacdowell/dotnetcore-crud-api | src/Controllers/PeopleController.cs | 4,635 | C# |
using System.Linq;
namespace System.Windows.Forms
{
public static class ListViewExtensions
{
/// <summary>
/// Move the selected items by <seealso cref="MoveDirection"/>
/// </summary>
/// <param name="sender">The ListView</param>
/// <param name="direction">The move direction</param>
public static void MoveSelectedItems(this ListView sender, MoveDirection direction)
{
var valid = sender.SelectedItems.Count > 0 &&
((direction == MoveDirection.Down && (sender.SelectedItems[sender.SelectedItems.Count - 1].Index < sender.Items.Count - 1))
|| (direction == MoveDirection.Up && (sender.SelectedItems[0].Index > 0)));
if (valid)
{
var firstIndex = sender.SelectedItems[0].Index;
var selectedItems = sender.SelectedItems.Cast<ListViewItem>().ToList();
sender.BeginUpdate();
foreach (ListViewItem item in sender.SelectedItems)
item.Remove();
if (direction == MoveDirection.Up)
{
var insertTo = firstIndex - 1;
foreach (var item in selectedItems)
{
sender.Items.Insert(insertTo, item);
insertTo++;
}
}
else
{
var insertTo = firstIndex + 1;
foreach (var item in selectedItems)
{
sender.Items.Insert(insertTo, item);
insertTo++;
}
}
sender.EndUpdate();
}
}
}
}
| 35.019608 | 147 | 0.475364 | [
"MIT"
] | SDClowen/SDUI | SDUI/Extensions/ListViewExtensions.cs | 1,788 | C# |
using System.Dynamic;
using ServiceStack.ServiceHost;
using ServiceStack.ServiceInterface;
using WebDavClientTest.csharp;
namespace WebDavClientTest
{
[Route("/testwebdav")]
public class WebdavClientDTO
{
public string davurl { get; set; }
public string filename { get; set; }
public string content { get; set; }
public string log { get; set; }
}
[Route("/testwebdav2")]
public class WebdavClientDTO2
{
public string davurl { get; set; }
public string log { get; set; }
}
//user set the webdav url, service then connects to the webdav url gets list of file, upload test file, check for existence , delete the test file
public class WebDavClientService : Service
{
//public string _davurl;
private static WebdavClientDTO _dto = new WebdavClientDTO(){davurl="",log=""};
public WebdavClientDTO Get(WebdavClientDTO request)
{
if (_dto.davurl != null)
{
_dto.content = WebDavClient.Get(_dto.davurl, _dto.filename);
}
return _dto;
}
public WebdavClientDTO2 Get(WebdavClientDTO2 request)
{
return new WebdavClientDTO2{davurl="test1",log="testlog"};
}
public WebdavClientDTO Post(WebdavClientDTO request)
{
if (request.davurl != null)
{
_dto.davurl = request.davurl;
_dto.content = request.content;
_dto.filename = request.filename;
//put file via WEBDAV
_dto.log=WebDavClient.Put(_dto.davurl, _dto.filename, _dto.content);
}
return _dto;
}
public WebdavClientDTO Delete(WebdavClientDTO request)
{
_dto.davurl = "";
_dto.log = "";
return _dto;
}
}
} | 30.758065 | 150 | 0.575249 | [
"MIT"
] | TomasKulhanek/west-life-wp6 | wp6-virtualfolder/src/VFMetadata/WebDavClientTest/testui/WebDavClientService.cs | 1,909 | C# |
/*using System;
using System.Net.Http;
using System.Net.Mime;
using System.Text;
using FakeItEasy;
using FluentAssertions;
using Xunit;
namespace Dalion.HttpMessageSigning.SigningString {
public class DigestHeaderAppenderTests {
private readonly IBase64Converter _base64Converter;
private readonly HashAlgorithm _hashAlgorithm;
private readonly IHashAlgorithmFactory _hashAlgorithmFactory;
private readonly HttpRequestMessage _httpRequest;
private readonly DigestHeaderAppender _sut;
public DigestHeaderAppenderTests() {
_hashAlgorithm = HashAlgorithm.SHA384;
_httpRequest = new HttpRequestMessage {
Method = HttpMethod.Post,
RequestUri = new Uri("http://dalion.eu/api/resource/id1")
};
FakeFactory.Create(out _base64Converter, out _hashAlgorithmFactory);
_sut = new DigestHeaderAppender(_httpRequest, _hashAlgorithm, _base64Converter, _hashAlgorithmFactory);
}
public class BuildStringToAppend : DigestHeaderAppenderTests {
[Fact]
public void WhenMethodIsGet_ReturnsEmptyString() {
_httpRequest.Method = HttpMethod.Get;
var actual = _sut.BuildStringToAppend(HeaderName.PredefinedHeaderNames.Digest);
actual.Should().NotBeNull().And.BeEmpty();
}
[Fact]
public void WhenRequestHasNoContent_ReturnsEmptyDigestValue() {
_httpRequest.Content = null;
var actual = _sut.BuildStringToAppend(HeaderName.PredefinedHeaderNames.Digest);
actual.Should().Be("\ndigest: ");
}
[Fact]
public void ReturnsExpectedString() {
_httpRequest.Content = new StringContent("abc123", Encoding.UTF8, MediaTypeNames.Application.Json);
using (var hashAlgorithm = A.Fake<IHashAlgorithm>()) {
A.CallTo(() => _hashAlgorithmFactory.Create(_hashAlgorithm))
.Returns(hashAlgorithm);
var hashBytes = new byte[] {0x01, 0x02};
A.CallTo(() => hashAlgorithm.ComputeHash("abc123"))
.Returns(hashBytes);
A.CallTo(() => hashAlgorithm.Name)
.Returns("SHA-384");
var base64 = "xyz==";
A.CallTo(() => _base64Converter.ToBase64(hashBytes))
.Returns(base64);
var actual = _sut.BuildStringToAppend(HeaderName.PredefinedHeaderNames.Digest);
actual.Should().Be("\ndigest: SHA-384=xyz==");
}
}
}
}
}*/ | 38.111111 | 115 | 0.598761 | [
"MIT"
] | DavidLievrouw/HttpMessageSigning | src/HttpMessageSigning.Tests/SigningString/DigestHeaderAppenderTests.cs | 2,744 | C# |
#region YeaJur.Core.Handlers 4.0
/***
* 本代码版权归 侯兴鼎(YeaJur) 所有,All Rights Reserved (C) 2017
* CLR版本:4.0.30319.42000
* 唯一标识:caceaf9c-5a15-4ae7-b7b1-43b136ce8c47
**
* 所属域:DESKTOP-Q9MAAK4
* 机器名称:DESKTOP-Q9MAAK4
* 登录用户:houxi
* 创建时间:2017/7/25 21:19:01
* 创建人:侯兴鼎(YeaJur)
* E_mail:houxingding@hotmail.com
**
* 命名空间:YeaJur.Core.Handlers
* 类名称:ExcelHandler
* 文件名:ExcelHandler
* 文件描述:
***/
#endregion
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using NPOI.SS.Util;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using YeaJur.Core.Extensions;
using YeaJur.Mapper;
namespace YeaJur.Core.Handlers
{
/// <summary>
/// EXCEL助手类
/// </summary>
public class ExcelHandler
{
/// <summary>
/// 将datatable数据写入excel
/// </summary>
/// <param name="sourceTable"></param>
/// <param name="title"></param>
/// <returns></returns>
public static Stream RenderDataTableToExcel(DataTable sourceTable, string title)
{
var workbook = new HSSFWorkbook();
var ms = new MemoryStream();
var sheet = workbook.CreateSheet();
//在工作表中:建立行,参数为行号,从0计
var row0 = sheet.CreateRow(0);
//在行中:建立单元格,参数为列号,从0计
var cell0 = row0.CreateCell(0);
//设置单元格内容
cell0.SetCellValue(title);
var style1 = workbook.CreateCellStyle();
//设置单元格的样式:水平对齐居中
style1.Alignment = HorizontalAlignment.Center;
//新建一个字体样式对象
var font = workbook.CreateFont();
//设置字体加粗样式
font.Boldweight = short.MaxValue;
font.FontHeightInPoints
= 25;
//使用SetFont方法将字体样式添加到单元格样式中
style1.SetFont(font);
//将新的样式赋给单元格
cell0.CellStyle = style1;
//设置单元格的高度
row0.Height = 30 * 20;
//设置一个合并单元格区域,使用上下左右定义CellRangeAddress区域
//CellRangeAddress四个参数为:起始行,结束行,起始列,结束列
sheet.AddMergedRegion(new CellRangeAddress(0, 0, 0, sourceTable.Columns.Count - 1));
// Style the cell with borders all around.
var style = (HSSFCellStyle)workbook.CreateCellStyle();
//设置边框格式
style.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
style.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
style.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
style.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
var fonthead = workbook.CreateFont();
//设置字体加粗样式
fonthead.Boldweight = short.MaxValue;
var headerRow = sheet.CreateRow(1);
headerRow.Height = 20 * 20;
var i = 0;
// handling header.
foreach (DataColumn column in sourceTable.Columns)
{
//设置单元格的宽度
sheet.SetColumnWidth(i++, 25 * 256);
var cell = headerRow.CreateCell(column.Ordinal);
cell.SetCellValue(column.ColumnName);
cell.CellStyle = style;
}
// handling value.
var rowIndex = 2;
foreach (DataRow row in sourceTable.Rows)
{
var dataRow = sheet.CreateRow(rowIndex);
foreach (DataColumn column in sourceTable.Columns)
{
// Create a cell and put a value in it.
var cell = dataRow.CreateCell(column.Ordinal);
cell.SetCellValue(row[column].ToString());
cell.CellStyle = style;
}
rowIndex++;
}
workbook.Write(ms);
ms.Flush();
ms.Position = 0;
return ms;
}
/// <summary>
/// 将excel的数据写入datatable
/// </summary>
/// <param name="excelFileStream"></param>
/// <param name="sheetIndex"></param>
/// <param name="headerRowIndex"></param>
/// <returns></returns>
public static DataTable RenderDataTableFromExcel(Stream excelFileStream, int sheetIndex, int headerRowIndex)
{
var workbook = new HSSFWorkbook(excelFileStream);
var sheet = workbook.GetSheetAt(sheetIndex);
var table = new DataTable();
var headerRow = sheet.GetRow(headerRowIndex);
int cellCount = headerRow.LastCellNum;
for (int i = headerRow.FirstCellNum; i < cellCount; i++)
{
var column = new DataColumn(headerRow.GetCell(i).StringCellValue);
table.Columns.Add(column);
}
var rowCount = sheet.LastRowNum;
for (var i = (sheet.FirstRowNum + 1); i <= sheet.LastRowNum; i++)
{
var row = sheet.GetRow(i);
var dataRow = table.NewRow();
for (int j = row.FirstCellNum; j < cellCount; j++)
{
if (row.GetCell(j) != null)
dataRow[j] = row.GetCell(j).ToString();
}
table.Rows.Add(dataRow);
}
excelFileStream.Close();
workbook = null;
sheet = null;
return table;
}
/// <summary>
/// asp.net导出excel
/// </summary>
/// <param name="dt">数据</param>
/// <param name="title">标题</param>
/// <returns></returns>
public static string ExportExcelByWeb(DataTable dt, string title)
{
var txt = title.Split('\\').Last().Split('.')[0];
var ms = RenderDataTableToExcel(dt, txt) as MemoryStream;
///*情况1:在Asp.NET中,输出文件流,浏览器自动提示下载*/
//Response.AddHeader("Content-Disposition", string.Format("attachment; filename=download.xls"));
//Response.BinaryWrite(ms.ToArray());
var path = "Excel/" + txt + ".xls";
if (!Directory.Exists(title.Replace(txt + ".xls", string.Empty)))
{
Directory.CreateDirectory(title.Replace(txt + ".xls", string.Empty));
}
var fs = new FileStream(title, FileMode.Create);
//获得字节数组
if (ms != null)
{
var data = ms.ToArray(); // new UTF8Encoding().GetBytes(String);
//开始写入
fs.Write(data, 0, data.Length);
ms.Close();
ms.Dispose();
}
//清空缓冲区、关闭流
fs.Flush();
fs.Close();
return path;
}
/// <summary>
/// 获取导出数据
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="list">需要导出的数据集合</param>
/// <returns></returns>
public static DataTable GetExportData<T>(List<T> list)
{
var str = list.ToDataTable().ToJson();
foreach (var item in DescriptionHandler.GetList<T>())
{
str = str.Replace(item.Key, item.Value);
}
return str.ToModel<DataTable>();
}
}
} | 31.849558 | 116 | 0.523896 | [
"Apache-2.0"
] | YeaJur/YeaJur.Core | YeaJur.Core/Handlers/ExcelHandler.cs | 7,842 | C# |
//-----------------------------------------------------------------------------
// Copyright : (c) Chris Moore, 2020
// License : MIT
//-----------------------------------------------------------------------------
namespace Z0
{
using System.Reflection;
public interface IApiAssets : IAppService
{
Index<ResEmission> EmitAssetContent();
Index<DocLibEntry> EmitAssetIndex();
Index<ResEmission> EmitEmbedded(Assembly src, FS.FolderPath root, utf8 match = default, bool clear = true);
ResEmission Emit(in Asset src, FS.FolderPath root);
}
} | 31.473684 | 116 | 0.483278 | [
"BSD-3-Clause"
] | 0xCM/z0 | src/api/src/services/contracts/IApiAssets.cs | 598 | C# |
#region License
// Copyright (c) 2013, ClearCanvas Inc.
// All rights reserved.
// http://www.clearcanvas.ca
//
// This file is part of the ClearCanvas RIS/PACS open source project.
//
// The ClearCanvas RIS/PACS open source project is free software: you can
// redistribute it and/or modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// The ClearCanvas RIS/PACS open source project is distributed in the hope that it
// will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
// Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// the ClearCanvas RIS/PACS open source project. If not, see
// <http://www.gnu.org/licenses/>.
#endregion
#if UNIT_TESTS
using NUnit.Framework;
using ClearCanvas.Dicom.IO;
namespace ClearCanvas.Dicom.Tests
{
[TestFixture]
public class DicomPixelDataTests
{
[Test]
public void TestGetMinMaxPixelData()
{
Assert.AreEqual(0, DicomPixelData.GetMinPixelValue(7, false));
Assert.AreEqual(0, DicomPixelData.GetMinPixelValue(8, false));
Assert.AreEqual(0, DicomPixelData.GetMinPixelValue(12, false));
Assert.AreEqual(0, DicomPixelData.GetMinPixelValue(16, false));
Assert.AreEqual(127, DicomPixelData.GetMaxPixelValue(7, false));
Assert.AreEqual(255, DicomPixelData.GetMaxPixelValue(8, false));
Assert.AreEqual(4095, DicomPixelData.GetMaxPixelValue(12, false));
Assert.AreEqual(65535, DicomPixelData.GetMaxPixelValue(16, false));
Assert.AreEqual(-64, DicomPixelData.GetMinPixelValue(7, true));
Assert.AreEqual(-128, DicomPixelData.GetMinPixelValue(8, true));
Assert.AreEqual(-2048, DicomPixelData.GetMinPixelValue(12, true));
Assert.AreEqual(-32768, DicomPixelData.GetMinPixelValue(16, true));
Assert.AreEqual(63, DicomPixelData.GetMaxPixelValue(7, true));
Assert.AreEqual(127, DicomPixelData.GetMaxPixelValue(8, true));
Assert.AreEqual(2047, DicomPixelData.GetMaxPixelValue(12, true));
Assert.AreEqual(32767, DicomPixelData.GetMaxPixelValue(16, true));
}
#region Unused Bits
[Test]
public void TestZeroUnusedBits_BitsStored8_NoOp()
{
var testValues = new byte[] { 128, 255 };
var expectedValues = (byte[])testValues.Clone();
Assert.IsFalse(DicomUncompressedPixelData.ZeroUnusedBits(expectedValues, 8, 7));
Assert.AreEqual(expectedValues, testValues);
}
[Test]
public void TestZeroUnusedBits_BitsStored7()
{
// Actual: 64, 127, 127 (with extra bit at left=255)
// Test: 0\1000000, 0\1111111, 1\1111111
// Expected: 64, 127, 127
var testValues = new byte[] { 64, 127, 255 };
var expectedValues = new byte[] { 64, 127, 127 };
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 7, 6));
Assert.AreEqual(expectedValues, testValues);
//Won't have zeroed anything.
Assert.IsFalse(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 7, 6));
}
[Test]
public void TestZeroUnusedBits_BitsStored4_HighBit5()
{
// Actual: 15, [15, 15, 15, 10, 5, 3] (all with varying extra bits at both ends)
// Test: 00\1111\00, 11\1111\11, 01\1111\10, 10\1111\01, 10\1010\10, 01\0101\01, 11\0011\00
// Expected: 60, 60, 60, 60, 40, 20, 12 (actual, but not right-aligned)
var testValues = new byte[] { 60, 255, 126, 189, 170, 85, 204 };
var expectedValues = new byte[] { 60, 60, 60, 60, 40, 20, 12 };
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 4, 5));
Assert.AreEqual(expectedValues, testValues);
//Won't have zeroed anything.
Assert.IsFalse(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 4, 5));
}
[Test]
public void TestZeroUnusedBits_BitsStored16_NoOp()
{
var testValues = new ushort[] { 65535, 32767 };
var expectedValues = (ushort[])testValues.Clone();
Assert.IsFalse(DicomUncompressedPixelData.ZeroUnusedBits(expectedValues, 16, 15));
Assert.AreEqual(expectedValues, testValues);
}
[Test]
public void TestZeroUnusedBits_BitsStored15()
{
// Actual: 32767, 21845, 10922 (with extra bit at left=43690)
// Test: 0\111111111111111, 0\101010101010101, 1\010101010101010
// Expected: 32767, 21845, 10922
var testValues = new ushort[] { 32767, 21845, 43690 };
var expectedValues = new ushort[] { 32767, 21845, 10922 };
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 15, 14));
Assert.AreEqual(expectedValues, testValues);
Assert.IsFalse(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 15, 14));
}
[Test]
public void TestZeroUnusedBits_BitsStored10_HighBit12()
{
// Actual: 1023, 1023, 1023, 1023, 341, 682 (all with varying extra bits at both ends)
// Test: 111\1111111111\111, 010\1111111111\101, 101\1111111111\010, 000\1111111111\000, 111\0101010101\111, 010\1010101010\101
// Expected: 8184, 8184, 8184, 8184, 2728, 5456
var testValues = new ushort[] { 65535, 24573, 49146, 8184, 60079, 21845 };
var expectedValues = new ushort[] { 8184, 8184, 8184, 8184, 2728, 5456 };
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 10, 12));
Assert.AreEqual(expectedValues, testValues);
Assert.IsFalse(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 10, 12));
}
[Test]
public void TestZeroUnusedBits_BitsStored10_HighBit12_AsBytes()
{
// Actual: 1023, 1023, 1023, 1023, 341, 682 (all with varying extra bits at both ends)
// Test: 111\1111111111\111, 010\1111111111\101, 101\1111111111\010, 000\1111111111\000, 111\0101010101\111, 010\1010101010\101
// Expected: 8184, 8184, 8184, 8184, 2728, 5456
var testValues = new ushort[] { 65535, 24573, 49146, 8184, 60079, 21845 };
var expectedValues = new ushort[] { 8184, 8184, 8184, 8184, 2728, 5456 };
var testValuesBytes = ByteConverter.ToByteArray(testValues); //to bytes
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValuesBytes, 16, 10, 12));
testValues = ByteConverter.ToUInt16Array(testValuesBytes); //back to ushorts
Assert.AreEqual(expectedValues, testValues);
}
[Test]
public void TestZeroUnusedBits_BitsStored10_HighBit12_OpposingEndian()
{
// Actual: 1023, 1023, 1023, 1023, 341, 682 (all with varying extra bits at both ends)
// Test: 111\1111111111\111, 010\1111111111\101, 101\1111111111\010, 000\1111111111\000, 111\0101010101\111, 010\1010101010\101
// Expected: 8184, 8184, 8184, 8184, 2728, 5456
var testValues = new ushort[] { 65535, 24573, 49146, 8184, 60079, 21845 };
var expectedValues = new ushort[] { 8184, 8184, 8184, 8184, 2728, 5456 };
var opposingEndian = (ByteBuffer.LocalMachineEndian == Endian.Big) ? Endian.Little : Endian.Big;
ByteConverter.SwapBytes(testValues);
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 10, 12, opposingEndian));
ByteConverter.SwapBytes(testValues);
Assert.AreEqual(expectedValues, testValues);
}
[Test]
public void TestZeroUnusedBits_BitsStored10_HighBit12_AsBytes_OpposingEndian()
{
// Actual: 1023, 1023, 1023, 1023, 341, 682 (all with varying extra bits at both ends)
// Test: 111\1111111111\111, 010\1111111111\101, 101\1111111111\010, 000\1111111111\000, 111\0101010101\111, 010\1010101010\101
// Expected: 8184, 8184, 8184, 8184, 2728, 5456
var testValues = new ushort[] { 65535, 24573, 49146, 8184, 60079, 21845 };
var expectedValues = new ushort[] { 8184, 8184, 8184, 8184, 2728, 5456 };
var opposingEndian = (ByteBuffer.LocalMachineEndian == Endian.Big) ? Endian.Little : Endian.Big;
ByteConverter.SwapBytes(testValues); //swap
var testValuesBytes = ByteConverter.ToByteArray(testValues); //to bytes
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValuesBytes, 16, 10, 12, opposingEndian));
testValues = ByteConverter.ToUInt16Array(testValuesBytes); //back to ushort
ByteConverter.SwapBytes(testValues);//un-swap
Assert.AreEqual(expectedValues, testValues);
Assert.IsFalse(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 10, 12));
}
#endregion
#region Right Align
public void TestRightAlign_BitsStored8_NoOp()
{
var testValues = new byte[] { 128, 255 };
var expectedValues = (byte[])testValues.Clone();
Assert.IsFalse(DicomUncompressedPixelData.RightAlign(expectedValues, 8, 7));
Assert.AreEqual(expectedValues, testValues);
}
[Test]
public void TestRightAlign_BitsStored7_NoOp()
{
// 64, 127
// 0\1000000, 0\1111111
var testValues = new byte[] { 64, 127 };
var expectedValues = (byte[])testValues.Clone();
Assert.IsFalse(DicomUncompressedPixelData.RightAlign(testValues, 7, 6));
Assert.AreEqual(expectedValues, testValues);
}
[Test]
public void TestRightAlign_BitsStored4_HighBit5()
{
// Actual: 15, [15, 15, 15, 10, 5, 3] (all with varying extra bits at both ends)
// Test: 00\1111\00, 11\1111\11, 01\1111\10, 10\1111\01, 10\1010\10, 01\0101\01, 11\0011\00
// Expected: 15, 15, 15, 15, 10, 5, 3
var testValues = new byte[] { 60, 255, 126, 189, 170, 85, 204 };
var expectedValues = new byte[] { 15, 15, 15, 15, 10, 5, 3 };
TestRightAlign(testValues, 4, 5, expectedValues);
}
[Test]
public void TestRightAlign_BitsStored16_NoOp()
{
var testValues = new ushort[] { 65535, 32767 };
var expectedValues = (ushort[])testValues.Clone();
Assert.IsFalse(DicomUncompressedPixelData.RightAlign(expectedValues, 16, 15));
Assert.AreEqual(testValues, expectedValues);
}
[Test]
public void TestRightAlign_BitsStored15_NoOp()
{
// Actual: 32767, 21845, 10922 (with extra bit at left=43690)
// Test: 0\111111111111111, 0\101010101010101, 1\010101010101010
// Expected: 32767, 21845, 10922
var testValues = new ushort[] { 32767, 21845, 43690 };
var expectedValues = new ushort[] { 32767, 21845, 10922 };
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValues, 15, 14));
Assert.IsFalse(DicomUncompressedPixelData.RightAlign(testValues, 16, 15));
Assert.AreEqual(expectedValues, testValues);
}
[Test]
public void TestRightAlign_BitsStored10_HighBit12()
{
// Actual: 1023, 1023, 1023, 1023, 341, 682 (all with varying extra bits at both ends)
// Test: 111\1111111111\111, 010\1111111111\101, 101\1111111111\010, 000\1111111111\000, 111\0101010101\111, 010\1010101010\101
// Expected: 1023, 1023, 1023, 1023, 341, 682
var testValues = new ushort[] { 65535, 24573, 49146, 8184, 60079, 21845 };
var expectedValues = new ushort[] { 1023, 1023, 1023, 1023, 341, 682 };
TestRightAlign(testValues, 10, 12, expectedValues, false, false);
}
[Test]
public void TestRightAlign_BitsStored10_HighBit12_AsBytes()
{
// Actual: 1023, 1023, 1023, 1023, 341, 682 (all with varying extra bits at both ends)
// Test: 111\1111111111\111, 010\1111111111\101, 101\1111111111\010, 000\1111111111\000, 111\0101010101\111, 010\1010101010\101
// Expected: 1023, 1023, 1023, 1023, 341, 682
var testValues = new ushort[] { 65535, 24573, 49146, 8184, 60079, 21845 };
var expectedValues = new ushort[] { 1023, 1023, 1023, 1023, 341, 682 };
TestRightAlign(testValues, 10, 12, expectedValues, true, false);
}
[Test]
public void TestRightAlign_BitsStored10_HighBit12_OpposingEndian()
{
// Actual: 1023, 1023, 1023, 1023, 341, 682 (all with varying extra bits at both ends)
// Test: 111\1111111111\111, 010\1111111111\101, 101\1111111111\010, 000\1111111111\000, 111\0101010101\111, 010\1010101010\101
// Expected: 1023, 1023, 1023, 1023, 341, 682
var testValues = new ushort[] { 65535, 24573, 49146, 8184, 60079, 21845 };
var expectedValues = new ushort[] { 1023, 1023, 1023, 1023, 341, 682 };
TestRightAlign(testValues, 10, 12, expectedValues, false, true);
}
[Test]
public void TestRightAlign_BitsStored10_HighBit12_AsBytes_OpposingEndian()
{
// Actual: 1023, 1023, 1023, 1023, 341, 682 (all with varying extra bits at both ends)
// Test: 111\1111111111\111, 010\1111111111\101, 101\1111111111\010, 000\1111111111\000, 111\0101010101\111, 010\1010101010\101
// Expected: 1023, 1023, 1023, 1023, 341, 682
var testValues = new ushort[] { 65535, 24573, 49146, 8184, 60079, 21845 };
var expectedValues = new ushort[] { 1023, 1023, 1023, 1023, 341, 682 };
TestRightAlign(testValues, 10, 12, expectedValues, true, true);
}
[Test]
public void TestRightAlign_BitsStored6_HighBit6_Signed()
{
// Actual: -32, -17, -6, 2, 6, 15, 31 (all with varying extra bits at both ends)
// Test: 1\100000\1, 1\101111\0, 1\111010\1, 0\000010\0, 1\000110\1, 0\001111\0, 1\011111\0
// Expected: -32, -17, -6, 2, 6, 15, 31
var testValues = new byte[] { 0xC1, 0xDE, 0xF5, 0x4, 0x8D, 0x1E, 0xBE }; //Test values in hex
var expectedValues = new sbyte[] { -32, -17, -6, 2, 6, 15, 31 };
TestRightAlignSigned(testValues, 6, 6, expectedValues);
}
[Test]
public void TestRightAlign_BitsStored12_HighBit13_Signed()
{
// Actual: -2048, -1111, -107, -2, 6, 107, 1113, 2047
// Test: 11\100000000000\10, 10\101110101001\11, 01\111110010101\00, 00\111111111110\01, 01\000000000110\00, 10\000001101011\11, 01\010001011001\00, 11\011111111111\01
// Expected: -2048, -1111, -107, -2, 6, 107, 1113, 2047
var testValues = new ushort[] { 0xE002, 0xAEA7, 0x7E54, 0x3FF9, 0x4018, 0x81AF, 0x5164, 0xDFFD }; //Test values in hex
var expectedValues = new short[] { -2048, -1111, -107, -2, 6, 107, 1113, 2047 };
TestRightAlignSigned(testValues, 12, 13, expectedValues, false, false);
}
[Test]
public void TestRightAlign_BitsStored12_HighBit13_Signed_AsBytes()
{
// Actual: -2048, -1111, -107, -2, 6, 107, 1113, 2047
// Test: 11\100000000000\10, 10\101110101001\11, 01\111110010101\00, 00\111111111110\01, 01\000000000110\00, 10\000001101011\11, 01\010001011001\00, 11\011111111111\01
// Expected: -2048, -1111, -107, -2, 6, 107, 1113, 2047
var testValues = new ushort[] { 0xE002, 0xAEA7, 0x7E54, 0x3FF9, 0x4018, 0x81AF, 0x5164, 0xDFFD }; //Test values in hex
var expectedValues = new short[] { -2048, -1111, -107, -2, 6, 107, 1113, 2047 };
TestRightAlignSigned(testValues, 12, 13, expectedValues, true, false);
}
[Test]
public void TestRightAlign_BitsStored12_HighBit13_Signed_OpposingEndian()
{
// Actual: -2048, -1111, -107, -2, 6, 107, 1113, 2047
// Test: 11\100000000000\10, 10\101110101001\11, 01\111110010101\00, 00\111111111110\01, 01\000000000110\00, 10\000001101011\11, 01\010001011001\00, 11\011111111111\01
// Expected: -2048, -1111, -107, -2, 6, 107, 1113, 2047
var testValues = new ushort[] { 0xE002, 0xAEA7, 0x7E54, 0x3FF9, 0x4018, 0x81AF, 0x5164, 0xDFFD }; //Test values in hex
var expectedValues = new short[] { -2048, -1111, -107, -2, 6, 107, 1113, 2047 };
TestRightAlignSigned(testValues, 12, 13, expectedValues, false, true);
}
[Test]
public void TestRightAlign_BitsStored12_HighBit13_Signed_AsBytes_OpposingEndian()
{
// Actual: -2048, -1111, -107, -2, 6, 107, 1113, 2047
// Test: 11\100000000000\10, 10\101110101001\11, 01\111110010101\00, 00\111111111110\01, 01\000000000110\00, 10\000001101011\11, 01\010001011001\00, 11\011111111111\01
// Expected: -2048, -1111, -107, -2, 6, 107, 1113, 2047
var testValues = new ushort[] { 0xE002, 0xAEA7, 0x7E54, 0x3FF9, 0x4018, 0x81AF, 0x5164, 0xDFFD }; //Test values in hex
var expectedValues = new short[] { -2048, -1111, -107, -2, 6, 107, 1113, 2047 };
TestRightAlignSigned(testValues, 12, 13, expectedValues, true, true);
}
private static void TestRightAlign(byte[] testValues, int bitsStored, int highBit, byte[] expectedValues)
{
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValues, bitsStored, highBit));
Assert.IsTrue(DicomUncompressedPixelData.RightAlign(testValues, bitsStored, highBit));
Assert.AreEqual(expectedValues, testValues); //Expected values in hex
}
private static void TestRightAlignSigned(byte[] testValues, int bitsStored, int highBit, sbyte[] expectedValues)
{
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValues, bitsStored, highBit));
Assert.IsTrue(DicomUncompressedPixelData.RightAlign(testValues, bitsStored, highBit));
Assert.AreEqual(expectedValues, DicomSignedToSigned(testValues, highBit - DicomPixelData.GetLowBit(bitsStored, highBit)));
}
private static void TestRightAlign(ushort[] testValues, int bitsStored, int highBit, ushort[] expectedValues, bool asBytes, bool asOpposingEndian)
{
TestRightAlign(ref testValues, bitsStored, highBit, asBytes, asOpposingEndian);
Assert.AreEqual(expectedValues, testValues);
}
private static void TestRightAlignSigned(ushort[] testValues, int bitsStored, int highBit, short[] expectedValues, bool asBytes, bool asOpposingEndian)
{
TestRightAlign(ref testValues, bitsStored, highBit, asBytes, asOpposingEndian);
var newHighBit = highBit - DicomPixelData.GetLowBit(bitsStored, highBit);
Assert.AreEqual(expectedValues, DicomSignedToSigned(testValues, newHighBit));
}
private static void TestRightAlign(ref ushort[] testValues, int bitsStored, int highBit, bool asBytes, bool asOpposingEndian)
{
if (!asBytes)
{
if (asOpposingEndian)
{
var opposingEndian = (ByteBuffer.LocalMachineEndian == Endian.Big) ? Endian.Little : Endian.Big;
ByteConverter.SwapBytes(testValues);
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValues, bitsStored, highBit, opposingEndian));
Assert.IsTrue(DicomUncompressedPixelData.RightAlign(testValues, bitsStored, highBit, opposingEndian));
ByteConverter.SwapBytes(testValues);
}
else
{
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValues, bitsStored, highBit));
Assert.IsTrue(DicomUncompressedPixelData.RightAlign(testValues, bitsStored, highBit));
}
}
else
{
if (asOpposingEndian)
{
ByteConverter.SwapBytes(testValues);
var testValuesBytes = ByteConverter.ToByteArray(testValues);
var opposingEndian = (ByteBuffer.LocalMachineEndian == Endian.Big) ? Endian.Little : Endian.Big;
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValuesBytes, 16, bitsStored, highBit, opposingEndian));
Assert.IsTrue(DicomUncompressedPixelData.RightAlign(testValuesBytes, 16, bitsStored, highBit, opposingEndian));
testValues = ByteConverter.ToUInt16Array(testValuesBytes);
ByteConverter.SwapBytes(testValues);
}
else
{
var testValuesBytes = ByteConverter.ToByteArray(testValues);
Assert.IsTrue(DicomUncompressedPixelData.ZeroUnusedBits(testValuesBytes, 16, bitsStored, highBit));
Assert.IsTrue(DicomUncompressedPixelData.RightAlign(testValuesBytes, 16, bitsStored, highBit));
testValues = ByteConverter.ToUInt16Array(testValuesBytes);
}
}
}
#endregion
#region Toggle Pixel Representation
[Test]
public void TestTogglePixelRep_BitsStored8_HighBit7()
{
//Test: -128, -95, -27, -1, 0, 27, 93, 127
//Test (bin): 10000000, 10100001, 11100101, 11111111, 00000000, 00011011, 01011101, 01111111
const int bitsAllocated = 8;
const int bitsStored = 8;
const int highBit = 7;
var testValues = new byte[] { 0x80, 0xA1, 0xE5, 0xFF, 0x0, 0x1B, 0x5D, 0x7F };
var expectedValues = new byte[] { 0, 33, 101, 127, 128, 155, 221, 255 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, testValues);
Assert.AreEqual(rescale, 128);
}
[Test]
public void TestTogglePixelRep_BitsStored7_HighBit6()
{
//Test: -64, -31, -8, -1, 0, 13, 43, 63
//Test (bin): 01000000, 01100001, 01111000, 01111111, 00000000, 00001101, 00101011, 00111111
const int bitsAllocated = 8;
const int bitsStored = 7;
const int highBit = 6;
var testValues = new byte[] { 0x40, 0x61, 0x78, 0x7F, 0x0, 0xD, 0x2B, 0x3F };
var expectedValues = new byte[] { 0, 33, 56, 63, 64, 77, 107, 127 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, testValues);
Assert.AreEqual(rescale, 64);
}
[Test]
public void TestTogglePixelRep_BitsStored7_HighBit7()
{
//Test: -64, -31, -8, -1, 0, 13, 43, 63
//Test (bin): 10000000, 11000010, 11110000, 11111110, 00000000, 00011010, 01010110, 01111110
const int bitsAllocated = 8;
const int bitsStored = 7;
const int highBit = 7;
var testValues = new byte[] { 0x80, 0xC2, 0xF0, 0xFE, 0x0, 0x1A, 0x56, 0x7E };
var expectedValues = new byte[] { 0, 33, 56, 63, 64, 77, 107, 127 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, testValues);
Assert.AreEqual(rescale, 64);
}
[Test]
public void TestTogglePixelRep_BitsStored6_HighBit7()
{
//Test: -32, -16, -8, -1, 0, 7, 13, 31
//Test(bin): 10000000, 11000000, 11100000, 11111100, 00000000, 00011100, 00110100, 01111100
const int bitsAllocated = 8;
const int bitsStored = 6;
const int highBit = 7;
var testValues = new byte[] { 0x80, 0xC0, 0xE0, 0xFC, 0x0, 0x1C, 0x34, 0x7C };
var expectedValues = new byte[] { 0, 16, 24, 31, 32, 39, 45, 63 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, testValues);
Assert.AreEqual(rescale, 32);
}
[Test]
public void TestTogglePixelRep_BitsStored6_HighBit6()
{
//Test: -32, -16, -8, -1, 0, 7, 13, 31
//Test(bin): 01000000, 01100000, 01110000, 01111110, 00000000, 00001110, 00011010, 00111110
const int bitsAllocated = 8;
const int bitsStored = 6;
const int highBit = 6;
var testValues = new byte[] { 0x40, 0x60, 0x70, 0x7E, 0x0, 0xE, 0x1A, 0x3E };
var expectedValues = new byte[] { 0, 16, 24, 31, 32, 39, 45, 63 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, testValues);
Assert.AreEqual(rescale, 32);
}
[Test]
public void TestTogglePixelRep_BitsStored5_HighBit6()
{
//Test: -16, -11, -7, -1, 0, 7, 11, 15
//Test(bin): 01000000, 01010100, 01100100, 01111100, 00000000, 00011100, 00101100, 00111100
const int bitsAllocated = 8;
const int bitsStored = 5;
const int highBit = 6;
var testValues = new byte[] { 0x40, 0x54, 0x64, 0x7C, 0x0, 0x1C, 0x2C, 0x3C };
var expectedValues = new byte[] { 0, 5, 9, 15, 16, 23, 27, 31 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, testValues);
Assert.AreEqual(rescale, 16);
}
[Test]
public void TestTogglePixelRep_BitsStored5_HighBit4()
{
//Test: -16, -11, -7, -1, 0, 7, 11, 15
//Test(bin): 00010000, 00010101, 00011001, 00011111, 00000000, 00000111, 00001011, 00001111
const int bitsAllocated = 8;
const int bitsStored = 5;
const int highBit = 4;
var testValues = new byte[] { 0x10, 0x15, 0x19, 0x1F, 0x0, 0x7, 0xB, 0xF };
var expectedValues = new byte[] { 0, 5, 9, 15, 16, 23, 27, 31 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, testValues);
Assert.AreEqual(rescale, 16);
}
[Test]
public unsafe void TestTogglePixelRep_BitsStored16_HighBit15()
{
//Test: -32768, -21101, -9999, -3, 0, 3, 9787, 21397, 32767
//Test(bin): 10000000 00000000, 10101101 10010011, 11011000 11110001, 11111111 11111101, 00000000 00000000, 00000000 00000011, 00100110 00111011, 01010011 10010101, 01111111 11111111
const int bitsAllocated = 16;
const int bitsStored = 16;
const int highBit = 15;
var testValues = ByteConverter.ToByteArray(new ushort[] { 0x8000, 0xAD93, 0xD8F1, 0xFFFD, 0x00, 0x03, 0x263B, 0x5395, 0x7FFF });
var expectedValues = new ushort[] { 0, 11667, 22769, 32765, 32768, 32771, 42555, 54165, 65535 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, ByteConverter.ToUInt16Array(testValues));
Assert.AreEqual(rescale, 32768);
}
[Test]
public void TestTogglePixelRep_BitsStored15_HighBit15()
{
//Test: -16384, -9817, -4331, -3, 0, 3, 4331, 9817, 16383
//Test(bin): 10000000 00000000, 10110011 01001110, 11011110 00101010, 11111111 11111010, 00000000 00000000, 00000000 00000110, 00100001 11010110, 01001100 10110010, 01111111 11111110,
const int bitsAllocated = 16;
const int bitsStored = 15;
const int highBit = 15;
var testValues = ByteConverter.ToByteArray(new ushort[] { 0x8000, 0xB34E, 0xDE2A, 0xFFFA, 0x00, 0x06, 0x21D6, 0x4CB2, 0x7FFE });
var expectedValues = new ushort[] { 0, 6567, 12053, 16381, 16384, 16387, 20715, 26201, 32767 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, ByteConverter.ToUInt16Array(testValues));
Assert.AreEqual(rescale, 16384);
}
[Test]
public void TestTogglePixelRep_BitsStored14_HighBit15()
{
//Test: -8192, -4331, -2177, -3, 0, 3, 2177, 4331, 8191
//Test(bin): 10000000 00000000, 10111100 01010100, 11011101 11111100, 11111111 11110100, 00000000 00000000, 00000000 00001100, 00100010 00000100, 01000011 10101100, 01111111 11111100,
const int bitsAllocated = 16;
const int bitsStored = 14;
const int highBit = 15;
var testValues = ByteConverter.ToByteArray(new ushort[] { 0x8000, 0xBC54, 0xDDFC, 0xFFF4, 0x00, 0x0C, 0x2204, 0x43AC, 0x7FFC });
var expectedValues = new ushort[] { 0, 3861, 6015, 8189, 8192, 8195, 10369, 12523, 16383 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, ByteConverter.ToUInt16Array(testValues));
Assert.AreEqual(rescale, 8192);
}
[Test]
public void TestTogglePixelRep_BitsStored12_HighBit13()
{
//Test: -2048, -1111, -787, -3, 0, 3, 763, 1567, 2047
//Test(bin): 00100000 00000000, 00101110 10100100, 00110011 10110100, 00111111 11110100, 00000000 00000000, 00000000 00001100, 00001011 11101100, 00011000 01111100, 00011111 11111100,
const int bitsAllocated = 16;
const int bitsStored = 12;
const int highBit = 13;
var testValues = ByteConverter.ToByteArray(new ushort[] { 0x2000, 0x2EA4, 0x33B4, 0x3FF4, 0x00, 0x0C, 0xBEC, 0x187C, 0x1FFC });
var expectedValues = new ushort[] { 0, 937, 1261, 2045, 2048, 2051, 2811, 3615, 4095 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, ByteConverter.ToUInt16Array(testValues));
Assert.AreEqual(rescale, 2048);
}
[Test]
public void TestTogglePixelRep_BitsStored12_HighBit11()
{
//Test: -2048, -1111, -787, -3, 0, 3, 763, 1567, 2047
//Test(bin): 00001000 00000000, 00001011 10101001, 00001100 11101101, 00001111 11111101, 00000000 00000000, 00000000 00000011, 00000010 11111011, 00000110 00011111, 00000111 11111111,
const int bitsAllocated = 16;
const int bitsStored = 12;
const int highBit = 11;
var testValues = ByteConverter.ToByteArray(new ushort[] { 0x800, 0xBA9, 0xCED, 0xFFD, 0x00, 0x03, 0x2FB, 0x61F, 0x7FF });
var expectedValues = new ushort[] { 0, 937, 1261, 2045, 2048, 2051, 2811, 3615, 4095 };
int rescale;
DicomUncompressedPixelData.TogglePixelRepresentation(testValues, highBit, bitsStored, bitsAllocated, out rescale);
Assert.AreEqual(expectedValues, ByteConverter.ToUInt16Array(testValues));
Assert.AreEqual(rescale, 2048);
}
#endregion
private static sbyte[] DicomSignedToSigned(byte[] shorts, int highBit)
{
var shift = 7 - highBit;
var values = new sbyte[shorts.Length];
for (int i = 0; i < values.Length; i++)
values[i] = (sbyte)(((sbyte)(shorts[i] << shift)) >> shift);
return values;
}
private static short[] DicomSignedToSigned(ushort[] shorts, int highBit)
{
var shift = 15 - highBit;
var values = new short[shorts.Length];
for (int i = 0; i < values.Length; i++)
values[i] = (short)(((short)(shorts[i] << shift)) >> shift);
return values;
}
}
}
#endif | 48.344526 | 196 | 0.621633 | [
"MIT"
] | Sharemee/Dicom | ClearCanvas.Dicom/Tests/DicomPixelDataTests.cs | 33,118 | C# |
using System;
namespace CenterPoint
{
class Program
{
public static void Main(string[] args)
{
double p1x = double.Parse(Console.ReadLine());
double p1y = double.Parse(Console.ReadLine());
double p2x = double.Parse(Console.ReadLine());
double p2y = double.Parse(Console.ReadLine());
CenterCloserPoint(p1x, p1y, p2x, p2y);
}
public static void CenterCloserPoint(double p1x, double p1y, double p2x, double p2y)
{
double firstPointDistance = Math.Sqrt((p1x * p1x) + (p1y * p1y));
double seconndPointDistance = Math.Sqrt((p2x * p2x) + (p2y * p2y));
Console.WriteLine((firstPointDistance > seconndPointDistance) ? $"({p2x}, {p2y})" : $"({p1x}, {p1y})");
}
}
}
| 32.6 | 115 | 0.573006 | [
"MIT"
] | AsenAsenow/SoftUni---Tech-Modile-Programing-Fundamentals | MethodsDebuggingAndTroubleshootingCode/CenterPoint/Program.cs | 817 | C# |
using System.Linq;
using Content.Shared.Body.Components;
using Content.Shared.Body.Part;
using Content.Shared.Damage;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using static Robust.Client.UserInterface.Controls.BoxContainer;
using static Robust.Client.UserInterface.Controls.ItemList;
namespace Content.Client.Body.UI
{
public sealed class BodyScannerDisplay : SS14Window
{
private IEntity? _currentEntity;
private SharedBodyPartComponent? _currentBodyPart;
private SharedBodyComponent? CurrentBody => _currentEntity?.GetComponentOrNull<SharedBodyComponent>();
public BodyScannerDisplay(BodyScannerBoundUserInterface owner)
{
IoCManager.InjectDependencies(this);
Owner = owner;
Title = Loc.GetString("body-scanner-display-title");
var hSplit = new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
Children =
{
// Left half
new ScrollContainer
{
HorizontalExpand = true,
Children =
{
(BodyPartList = new ItemList())
}
},
// Right half
new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
HorizontalExpand = true,
Children =
{
// Top half of the right half
new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
VerticalExpand = true,
Children =
{
(BodyPartLabel = new Label()),
new BoxContainer
{
Orientation = LayoutOrientation.Horizontal,
Children =
{
new Label
{
Text = $"{Loc.GetString("body-scanner-display-health-label")} "
},
(BodyPartHealth = new Label())
}
},
new ScrollContainer
{
VerticalExpand = true,
Children =
{
(MechanismList = new ItemList())
}
}
}
},
// Bottom half of the right half
(MechanismInfoLabel = new RichTextLabel
{
VerticalExpand = true
})
}
}
}
};
Contents.AddChild(hSplit);
BodyPartList.OnItemSelected += BodyPartOnItemSelected;
MechanismList.OnItemSelected += MechanismOnItemSelected;
MinSize = SetSize = (800, 600);
}
public BodyScannerBoundUserInterface Owner { get; }
private ItemList BodyPartList { get; }
private Label BodyPartLabel { get; }
private Label BodyPartHealth { get; }
private ItemList MechanismList { get; }
private RichTextLabel MechanismInfoLabel { get; }
public void UpdateDisplay(IEntity entity)
{
_currentEntity = entity;
BodyPartList.Clear();
var body = CurrentBody;
if (body == null)
{
return;
}
foreach (var (part, _) in body.Parts)
{
BodyPartList.AddItem(Loc.GetString(part.Name));
}
}
public void BodyPartOnItemSelected(ItemListSelectedEventArgs args)
{
var body = CurrentBody;
if (body == null)
{
return;
}
var slot = body.SlotAt(args.ItemIndex);
_currentBodyPart = body.PartAt(args.ItemIndex).Key;
if (slot.Part != null)
{
UpdateBodyPartBox(slot.Part, slot.Id);
}
}
private void UpdateBodyPartBox(SharedBodyPartComponent part, string slotName)
{
BodyPartLabel.Text = $"{Loc.GetString(slotName)}: {Loc.GetString(part.Owner.Name)}";
// TODO BODY Part damage
if (part.Owner.TryGetComponent(out DamageableComponent? damageable))
{
BodyPartHealth.Text = Loc.GetString("body-scanner-display-body-part-damage-text",("damage", damageable.TotalDamage));
}
MechanismList.Clear();
foreach (var mechanism in part.Mechanisms)
{
MechanismList.AddItem(mechanism.Name);
}
}
// TODO BODY Guaranteed this is going to crash when a part's mechanisms change. This part is left as an exercise for the reader.
public void MechanismOnItemSelected(ItemListSelectedEventArgs args)
{
UpdateMechanismBox(_currentBodyPart?.Mechanisms.ElementAt(args.ItemIndex));
}
private void UpdateMechanismBox(SharedMechanismComponent? mechanism)
{
// TODO BODY Improve UI
if (mechanism == null)
{
MechanismInfoLabel.SetMessage("");
return;
}
// TODO BODY Mechanism description
var message =
Loc.GetString(
$"{mechanism.Name}\nHealth: {mechanism.CurrentDurability}/{mechanism.MaxDurability}");
MechanismInfoLabel.SetMessage(message);
}
}
}
| 35.032258 | 136 | 0.459484 | [
"MIT"
] | AJCM-git/space-station-14 | Content.Client/Body/UI/BodyScannerDisplay.cs | 6,516 | C# |
#nullable enable
using System;
using System.Linq;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;
using Svg.CodeGen.Skia;
using Svg.Model;
using Svg.Skia;
namespace Svg.SourceGenerator.Skia
{
[Generator]
public class SvgSourceGenerator : ISourceGenerator
{
private static readonly IAssetLoader _assetLoader = new SkiaAssetLoader();
private static readonly DiagnosticDescriptor s_errorDescriptor = new DiagnosticDescriptor(
#pragma warning disable RS2008 // Enable analyzer release tracking
"SV0000",
#pragma warning restore RS2008 // Enable analyzer release tracking
$"Error in the {nameof(SvgSourceGenerator)} generator",
$"Error in the {nameof(SvgSourceGenerator)} generator: '{0}'",
$"{nameof(SvgSourceGenerator)}",
DiagnosticSeverity.Error,
isEnabledByDefault: true);
public void Initialize(GeneratorInitializationContext context)
{
// System.Diagnostics.Debugger.Launch();
}
public void Execute(GeneratorExecutionContext context)
{
try
{
context.AnalyzerConfigOptions.GlobalOptions.TryGetValue("build_property.NamespaceName", out var globalNamespaceName);
var files = context.AdditionalFiles.Where(at => at.Path.EndsWith(".svg", StringComparison.InvariantCultureIgnoreCase));
foreach (var file in files)
{
string? namespaceName = null;
if (!string.IsNullOrWhiteSpace(globalNamespaceName))
{
namespaceName = globalNamespaceName;
}
if (context.AnalyzerConfigOptions.GetOptions(file).TryGetValue("build_metadata.AdditionalFiles.NamespaceName", out var perFilenamespaceName))
{
if (!string.IsNullOrWhiteSpace(perFilenamespaceName))
{
namespaceName = perFilenamespaceName;
}
}
if (string.IsNullOrWhiteSpace(namespaceName))
{
namespaceName = "Svg";
}
context.AnalyzerConfigOptions.GetOptions(file).TryGetValue("build_metadata.AdditionalFiles.ClassName", out var className);
if (string.IsNullOrWhiteSpace(className))
{
className = CreateClassName(file.Path);
}
if (string.IsNullOrWhiteSpace(namespaceName))
{
context.ReportDiagnostic(Diagnostic.Create(s_errorDescriptor, Location.None, "The specified namespace name is invalid."));
return;
}
if (string.IsNullOrWhiteSpace(className))
{
context.ReportDiagnostic(Diagnostic.Create(s_errorDescriptor, Location.None, "The specified class name is invalid."));
return;
}
var svg = file.GetText(context.CancellationToken)?.ToString();
if (string.IsNullOrWhiteSpace(svg))
{
context.ReportDiagnostic(Diagnostic.Create(s_errorDescriptor, Location.None, "Svg file is null or empty."));
return;
}
var svgDocument = SvgModelExtensions.FromSvg(svg!);
if (svgDocument is { })
{
var picture = SvgModelExtensions.ToModel(svgDocument, _assetLoader);
if (picture is { } && picture.Commands is { })
{
var code = SkiaCodeGen.Generate(picture, namespaceName!, className!);
var sourceText = SourceText.From(code, Encoding.UTF8);
context.AddSource($"{className}.svg.cs", sourceText);
}
else
{
context.ReportDiagnostic(Diagnostic.Create(s_errorDescriptor, Location.None, "Invalid svg picture model."));
return;
}
}
else
{
context.ReportDiagnostic(Diagnostic.Create(s_errorDescriptor, Location.None, "Could not load svg document."));
return;
}
}
}
catch (Exception e)
{
context.ReportDiagnostic(Diagnostic.Create(s_errorDescriptor, Location.None, e.ToString()));
}
}
private string CreateClassName(string path)
{
string name = System.IO.Path.GetFileNameWithoutExtension(path);
string className = name.Replace("-", "_");
return $"Svg_{className}";
}
}
}
| 40.563492 | 161 | 0.531403 | [
"MIT"
] | inforithmics/Svg.Skia | src/Svg.SourceGenerator.Skia/SvgSourceGenerator.cs | 5,111 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// O código foi gerado por uma ferramenta.
// Versão de Tempo de Execução:4.0.30319.42000
//
// As alterações ao arquivo poderão causar comportamento incorreto e serão perdidas se
// o código for gerado novamente.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Revisao")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Revisao")]
[assembly: System.Reflection.AssemblyTitleAttribute("Revisao")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Gerado pela classe WriteCodeFragment do MSBuild.
| 41.958333 | 90 | 0.653426 | [
"MIT"
] | Alexssandro-hub/Digital_InnovationOne | obj/Debug/net5.0/Revisao.AssemblyInfo.cs | 1,016 | C# |
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace IdentityServer.Services
{
// This class is used by the application to send email for account confirmation and password reset.
// For more details see https://go.microsoft.com/fwlink/?LinkID=532713
public class EmailSender : IEmailSender
{
private readonly ILogger<EmailSender> _logger;
public EmailSender(ILogger<EmailSender> logger)
{
_logger = logger;
}
public Task SendEmailAsync(string email, string subject, string message)
{
_logger.LogInformation($"Sending email: {email}, subject: {subject}, message: {message}");
return Task.CompletedTask;
}
}
}
| 32.44 | 103 | 0.683107 | [
"Apache-2.0"
] | chiennt1612/IdentityServer4-ID | Services/EmailSender.cs | 811 | C# |
using System;
using System.Data;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using FluentAssertions;
using SimpleETL.Extract;
namespace SimpleETL.Tests
{
[TestClass]
public class DelimitedFileReaderTests
{
[TestMethod]
[TestCategory("Reader")]
public void Delimited_File_Read_Test()
{
Test(new DelimitedFileReader(@"_Data\comma.csv"));
Test(new DelimitedFileReader(@"_Data\comma.csv") { ColumnDelimeter = "," });
Test(new DelimitedFileReader(@"_Data\tab.txt") { ColumnDelimeter = "tab", TextDelimiter = "\"" });
Test(new DelimitedFileReader(@"_Data\space.txt") { ColumnDelimeter = "space", TextDelimiter = "'" });
Test(new DelimitedFileReader(@"_Data\delimited.txt") { ColumnDelimeter = "|" });
Test_No_Header(new DelimitedFileReader(@"_Data\noheader.csv") { HeaderRow = false });
}
private void Test(FileReaderBase sut)
{
IDataReader rdr = sut.GetReader();
CheckColumnNames(rdr);
CheckData(rdr);
}
private void CheckColumnNames(IDataReader rdr)
{
rdr.FieldCount.Should().Be(5);
rdr.GetName(0).Should().Be("int");
rdr.GetName(1).Should().Be("text");
rdr.GetName(2).Should().Be("date");
rdr.GetName(3).Should().Be("double");
rdr.GetName(4).Should().Be("bool");
}
private void CheckData(IDataReader rdr)
{
rdr.Read().Should().BeTrue();
rdr.GetValue(0).Should().Be("1");
rdr.GetValue(1).Should().Be("text data1");
rdr.GetValue(2).Should().Be("1/1/1960");
rdr.GetValue(3).Should().Be("12.3");
rdr.GetValue(4).Should().Be("true");
rdr.Read().Should().BeTrue();
rdr.GetValue(0).Should().Be("2");
rdr.GetValue(1).Should().Be("text data2");
rdr.GetValue(2).Should().Be("2/3/1970");
rdr.GetValue(3).Should().Be("4.56");
rdr.GetValue(4).Should().Be("false");
rdr.Read().Should().BeTrue();
rdr.GetValue(0).Should().Be("3");
rdr.GetValue(1).Should().Be("text data3");
rdr.GetValue(2).Should().Be("4/5/2016");
rdr.GetValue(3).Should().Be("7.89");
rdr.GetValue(4).Should().Be("true");
rdr.Read().Should().BeFalse();
}
private void Test_No_Header(FileReaderBase sut)
{
IDataReader rdr = sut.GetReader();
rdr.FieldCount.Should().Be(5);
rdr.GetName(0).Should().Be("F1");
rdr.GetName(1).Should().Be("F2");
rdr.GetName(2).Should().Be("F3");
rdr.GetName(3).Should().Be("F4");
rdr.GetName(4).Should().Be("F5");
rdr.Read().Should().BeTrue();
rdr.GetValue(0).Should().Be(1);
rdr.GetValue(1).Should().Be("text data1");
rdr.GetValue(2).Should().Be(new DateTime(1960, 1, 1));
rdr.GetValue(3).Should().Be(12.3);
rdr.GetValue(4).Should().Be("true");
rdr.Read().Should().BeTrue();
rdr.GetValue(0).Should().Be(2);
rdr.GetValue(1).Should().Be("text data2");
rdr.GetValue(2).Should().Be(new DateTime(1970, 2, 3));
rdr.GetValue(3).Should().Be(4.56);
rdr.GetValue(4).Should().Be("false");
rdr.Read().Should().BeTrue();
rdr.GetValue(0).Should().Be(3);
rdr.GetValue(1).Should().Be("text data3");
rdr.GetValue(2).Should().Be(new DateTime(2016, 4, 5));
rdr.GetValue(3).Should().Be(7.89);
rdr.GetValue(4).Should().Be("true");
rdr.Read().Should().BeFalse();
}
}
}
| 36.04717 | 113 | 0.529704 | [
"MIT"
] | syedraihan/SimpleETL | SimpleETL.Tests/Extract/DelimitedFileReaderTests.cs | 3,823 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace ChromeCAC
{
/// <summary>
/// Interaction logic for Popup.xaml
/// </summary>
public partial class Popup : Window
{
public Popup()
{
InitializeComponent();
}
}
}
| 20.821429 | 40 | 0.698113 | [
"MIT"
] | CACBridge/ChromeCAC | NativeApps/ChromeCAC.NET/Popup.xaml.cs | 585 | C# |
//
// Copyright (c) 2018 Rokas Kupstys
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using Urho3D;
namespace Editor.Tabs
{
public interface IInspectable
{
Serializable[] GetInspectableObjects();
}
public interface IHierarchyProvider
{
void RenderHierarchy();
}
}
| 36.189189 | 80 | 0.742345 | [
"MIT"
] | urho3d-archive/Urho3D-rebelfork | Source/Tools/Editor.Net/Tabs/TabInterfaces.cs | 1,341 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNet.WebHooks.Diagnostics;
using Microsoft.AspNet.WebHooks.Properties;
namespace Microsoft.AspNet.WebHooks
{
/// <summary>
/// Provides an implementation of <see cref="IWebHookManager"/> for managing notifications and mapping
/// them to registered WebHooks.
/// </summary>
public class WebHookManager : IWebHookManager, IDisposable
{
internal const string NoEchoParameter = "noecho";
internal const string EchoParameter = "echo";
private readonly IWebHookStore _webHookStore;
private readonly IWebHookSender _webHookSender;
private readonly ILogger _logger;
private readonly HttpClient _httpClient;
private bool _disposed;
/// <summary>
/// Initialize a new instance of the <see cref="WebHookManager"/> with a default retry policy.
/// </summary>
/// <param name="webHookStore">The current <see cref="IWebHookStore"/>.</param>
/// <param name="webHookSender">The current <see cref="IWebHookSender"/>.</param>
/// <param name="logger">The current <see cref="ILogger"/>.</param>
public WebHookManager(IWebHookStore webHookStore, IWebHookSender webHookSender, ILogger logger)
: this(webHookStore, webHookSender, logger, httpClient: null)
{
}
/// <summary>
/// Initialize a new instance of the <see cref="WebHookManager"/> with the given <paramref name="httpClient"/>. This
/// constructor is intended for unit testing purposes.
/// </summary>
internal WebHookManager(IWebHookStore webHookStore, IWebHookSender webHookSender, ILogger logger, HttpClient httpClient)
{
if (webHookStore == null)
{
throw new ArgumentNullException(nameof(webHookStore));
}
if (webHookSender == null)
{
throw new ArgumentNullException(nameof(webHookSender));
}
if (logger == null)
{
throw new ArgumentNullException(nameof(logger));
}
_webHookStore = webHookStore;
_webHookSender = webHookSender;
_logger = logger;
_httpClient = httpClient ?? new HttpClient();
}
/// <inheritdoc />
public virtual async Task VerifyWebHookAsync(WebHook webHook)
{
if (webHook == null)
{
throw new ArgumentNullException(nameof(webHook));
}
VerifySecret(webHook.Secret);
VerifyUri(webHook.WebHookUri);
await VerifyEchoAsync(webHook);
}
/// <inheritdoc />
public async Task<int> NotifyAsync(string user, IEnumerable<NotificationDictionary> notifications, Func<WebHook, string, bool> predicate)
{
if (user == null)
{
throw new ArgumentNullException(nameof(user));
}
if (notifications == null)
{
throw new ArgumentNullException(nameof(notifications));
}
// Get all actions in this batch
ICollection<NotificationDictionary> nots = notifications.ToArray();
string[] actions = nots.Select(n => n.Action).ToArray();
// Find all active WebHooks that matches at least one of the actions
ICollection<WebHook> webHooks = await _webHookStore.QueryWebHooksAsync(user, actions, predicate);
// For each WebHook set up a work item with the right set of notifications
IEnumerable<WebHookWorkItem> workItems = GetWorkItems(webHooks, nots);
// Start sending WebHooks
await _webHookSender.SendWebHookWorkItemsAsync(workItems);
return webHooks.Count;
}
/// <inheritdoc />
public async Task<int> NotifyAllAsync(IEnumerable<NotificationDictionary> notifications, Func<WebHook, string, bool> predicate)
{
if (notifications == null)
{
throw new ArgumentNullException(nameof(notifications));
}
// Get all actions in this batch
ICollection<NotificationDictionary> nots = notifications.ToArray();
string[] actions = nots.Select(n => n.Action).ToArray();
// Find all active WebHooks that matches at least one of the actions
ICollection<WebHook> webHooks = await _webHookStore.QueryWebHooksAcrossAllUsersAsync(actions, predicate);
// For each WebHook set up a work item with the right set of notifications
IEnumerable<WebHookWorkItem> workItems = GetWorkItems(webHooks, nots);
// Start sending WebHooks
await _webHookSender.SendWebHookWorkItemsAsync(workItems);
return webHooks.Count;
}
/// <inheritdoc />
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
internal static IEnumerable<WebHookWorkItem> GetWorkItems(ICollection<WebHook> webHooks, ICollection<NotificationDictionary> notifications)
{
List<WebHookWorkItem> workItems = new List<WebHookWorkItem>();
foreach (WebHook webHook in webHooks)
{
ICollection<NotificationDictionary> webHookNotifications;
// Pick the notifications that apply for this particular WebHook. If we only got one notification
// then we know that it applies to all WebHooks. Otherwise each notification may apply only to a subset.
if (notifications.Count == 1)
{
webHookNotifications = notifications;
}
else
{
webHookNotifications = notifications.Where(n => webHook.MatchesAction(n.Action)).ToArray();
if (webHookNotifications.Count == 0)
{
continue;
}
}
WebHookWorkItem workItem = new WebHookWorkItem(webHook, webHookNotifications);
workItems.Add(workItem);
}
return workItems;
}
/// <summary>
/// Releases the unmanaged resources and optionally releases the managed resources.
/// </summary>
/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <b>false</b> to release only unmanaged resources.</param>
protected virtual void Dispose(bool disposing)
{
if (!_disposed)
{
_disposed = true;
if (disposing)
{
if (_httpClient != null)
{
_httpClient.Dispose();
}
}
}
}
/// <summary>
/// Verifies the WebHook by submitting a GET request with a query token intended by the echoed back.
/// </summary>
/// <param name="webHook">The <see cref="WebHook"/> to verify.</param>
protected virtual async Task VerifyEchoAsync(WebHook webHook)
{
// Create the echo query parameter that we want returned in response body as plain text.
string echo = Guid.NewGuid().ToString("N");
HttpResponseMessage response;
try
{
// If WebHook URI contains a "NoEcho" query parameter then we don't verify the URI using a GET request
NameValueCollection parameters = webHook.WebHookUri.ParseQueryString();
if (parameters[NoEchoParameter] != null)
{
string msg = string.Format(CultureInfo.CurrentCulture, CustomResources.Manager_NoEcho);
_logger.Info(msg);
return;
}
// Get request URI with echo query parameter
UriBuilder webHookUri = new UriBuilder(webHook.WebHookUri);
webHookUri.Query = EchoParameter + "=" + echo;
// Create request adding any additional request headers (not entity headers) from Web Hook
HttpRequestMessage hookRequest = new HttpRequestMessage(HttpMethod.Get, webHookUri.Uri);
foreach (var kvp in webHook.Headers)
{
hookRequest.Headers.TryAddWithoutValidation(kvp.Key, kvp.Value);
}
response = await _httpClient.SendAsync(hookRequest);
}
catch (Exception ex)
{
string msg = string.Format(CultureInfo.CurrentCulture, CustomResources.Manager_VerifyFailure, ex.Message);
_logger.Error(msg, ex);
throw new InvalidOperationException(msg);
}
if (!response.IsSuccessStatusCode)
{
string msg = string.Format(CultureInfo.CurrentCulture, CustomResources.Manager_VerifyFailure, response.StatusCode);
_logger.Info(msg);
throw new InvalidOperationException(msg);
}
// Verify response body
if (response.Content == null)
{
string msg = CustomResources.Manager_VerifyNoBody;
_logger.Error(msg);
throw new InvalidOperationException(msg);
}
string actualEcho = await response.Content.ReadAsStringAsync();
if (!string.Equals(actualEcho, echo, StringComparison.Ordinal))
{
string msg = CustomResources.Manager_VerifyBadEcho;
_logger.Error(msg);
throw new InvalidOperationException(msg);
}
}
/// <summary>
/// Verifies that the <paramref name="webHookUri"/> has either an 'http' or 'https' scheme.
/// </summary>
/// <param name="webHookUri">The URI to verify.</param>
protected virtual void VerifyUri(Uri webHookUri)
{
// Check that WebHook URI scheme is either '<c>http</c>' or '<c>https</c>'.
if (!(webHookUri.IsHttp() || webHookUri.IsHttps()))
{
string msg = string.Format(CultureInfo.CurrentCulture, CustomResources.Manager_NoHttpUri, webHookUri);
_logger.Error(msg);
throw new InvalidOperationException(msg);
}
}
/// <summary>
/// Verifies that the <see cref="WebHook"/> secret is between 32 and 64 characters long.
/// </summary>
/// <param name="secret">The <see cref="WebHook"/> secret to validate.</param>
protected virtual void VerifySecret(string secret)
{
// Check that we have a valid secret
if (string.IsNullOrEmpty(secret) || secret.Length < 32 || secret.Length > 64)
{
throw new InvalidOperationException(CustomResources.WebHook_InvalidSecret);
}
}
}
}
| 40.457447 | 154 | 0.586817 | [
"Apache-2.0"
] | anuraj/WebHooks | src/Microsoft.AspNet.WebHooks.Custom/WebHooks/WebHookManager.cs | 11,411 | C# |
using System;
using System.Security.Cryptography;
using System.Text;
using Cosmos.Conversions;
// ReSharper disable once CheckNamespace
namespace Cosmos.Security.Verification
{
internal partial class MdFunction
{
private class Md5Worker : IMessageDigestWorker
{
private readonly MdTypes _type;
/// <summary>
/// MD5 Worker
/// </summary>
/// <param name="type"></param>
public Md5Worker(MdTypes type)
{
_type = type;
}
public byte[] Hash(ReadOnlySpan<byte> buff)
{
using var algorithm = MD5.Create();
var hashVal = algorithm.ComputeHash(buff.ToArray());
return _type switch
{
MdTypes.Md5 => hashVal,
MdTypes.Md5Bit16 => hashVal.AsSpan(4, 8).ToArray(),
MdTypes.Md5Bit32 => hashVal,
MdTypes.Md5Bit64 => Encoding.UTF8.GetBytes(BaseConv.ToBase64(hashVal)),
_ => hashVal
};
}
}
}
} | 29.333333 | 91 | 0.508741 | [
"Apache-2.0"
] | CosmosLoops/OneMore | src/Cosmos.Security.Verification/Cosmos/Security/Verification/MD/MdFunction.Worker5.cs | 1,146 | C# |
using System;
using System.Data;
using System.IO;
using ActiveQueryBuilder.Core;
using ActiveQueryBuilder.Web.Core;
using ActiveQueryBuilder.Web.Server;
using ActiveQueryBuilder.Web.Server.Services;
using ASP.NET_Core.Helpers;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
namespace MVC_Samples.Controllers
{
public class LoadMetadataDemoController : Controller
{
private readonly IDbConnection _conn;
private string instanceId = "BootstrapTheming";
private readonly IHostingEnvironment _env;
private readonly IQueryBuilderService _aqbs;
private readonly IConfiguration _config;
// Use IQueryBuilderService to get access to the server-side instances of Active Query Builder objects.
// See the registration of this service in the Startup.cs.
public LoadMetadataDemoController(IQueryBuilderService aqbs, IHostingEnvironment env, IConfiguration config)
{
_aqbs = aqbs;
_env = env;
_config = config;
_conn = DataBaseHelper.CreateSqLiteConnection(Path.Combine(_env.WebRootPath, _config["SqLiteDataBase"]));
}
public ActionResult Index()
{
// Get an instance of the QueryBuilder object
var qb = _aqbs.GetOrCreate(instanceId, q => q.SyntaxProvider = new GenericSyntaxProvider());
return View(qb);
}
//////////////////////////////////////////////////////////////////////////
/// 1st way:
/// This method demonstrates the direct access to the internal metadata
/// objects collection (MetadataContainer).
//////////////////////////////////////////////////////////////////////////
public void Way1()
{
var queryBuilder1 = _aqbs.Get(instanceId);
ResetQueryBuilderMetadata(queryBuilder1);
queryBuilder1.SyntaxProvider = new GenericSyntaxProvider();
// prevent QueryBuilder to request metadata
queryBuilder1.MetadataLoadingOptions.OfflineMode = true;
queryBuilder1.MetadataProvider = null;
MetadataContainer metadataContainer = queryBuilder1.MetadataContainer;
metadataContainer.BeginUpdate();
try
{
metadataContainer.Clear();
MetadataNamespace schemaDbo = metadataContainer.AddSchema("dbo");
// prepare metadata for table "Orders"
MetadataObject orders = schemaDbo.AddTable("Orders");
// fields
orders.AddField("OrderId");
orders.AddField("CustomerId");
// prepare metadata for table "Order Details"
MetadataObject orderDetails = schemaDbo.AddTable("Order Details");
// fields
orderDetails.AddField("OrderId");
orderDetails.AddField("ProductId");
// foreign keys
MetadataForeignKey foreignKey = orderDetails.AddForeignKey("OrderDetailsToOrders");
using (MetadataQualifiedName referencedName = new MetadataQualifiedName())
{
referencedName.Add("Orders");
referencedName.Add("dbo");
foreignKey.ReferencedObjectName = referencedName;
}
foreignKey.Fields.Add("OrderId");
foreignKey.ReferencedFields.Add("OrderId");
}
finally
{
metadataContainer.EndUpdate();
}
queryBuilder1.MetadataStructure.Refresh();
}
//////////////////////////////////////////////////////////////////////////
/// 2rd way:
/// This method demonstrates on-demand manual filling of metadata structure using
/// corresponding MetadataContainer.ItemMetadataLoading event
//////////////////////////////////////////////////////////////////////////
public void Way2()
{
var queryBuilder1 = _aqbs.Get(instanceId);
ResetQueryBuilderMetadata(queryBuilder1);
// allow QueryBuilder to request metadata
queryBuilder1.MetadataLoadingOptions.OfflineMode = false;
queryBuilder1.MetadataProvider = null;
queryBuilder1.MetadataContainer.ItemMetadataLoading += way2ItemMetadataLoading;
queryBuilder1.MetadataStructure.Refresh();
}
private void way2ItemMetadataLoading(object sender, MetadataItem item, MetadataType types)
{
switch (item.Type)
{
case MetadataType.Root:
if ((types & MetadataType.Schema) > 0) item.AddSchema("dbo");
break;
case MetadataType.Schema:
if ((item.Name == "dbo") && (types & MetadataType.Table) > 0)
{
item.AddTable("Orders");
item.AddTable("Order Details");
}
break;
case MetadataType.Table:
if (item.Name == "Orders")
{
if ((types & MetadataType.Field) > 0)
{
item.AddField("OrderId");
item.AddField("CustomerId");
}
}
else if (item.Name == "Order Details")
{
if ((types & MetadataType.Field) > 0)
{
item.AddField("OrderId");
item.AddField("ProductId");
}
if ((types & MetadataType.ForeignKey) > 0)
{
MetadataForeignKey foreignKey = item.AddForeignKey("OrderDetailsToOrder");
foreignKey.Fields.Add("OrderId");
foreignKey.ReferencedFields.Add("OrderId");
using (MetadataQualifiedName name = new MetadataQualifiedName())
{
name.Add("Orders");
name.Add("dbo");
foreignKey.ReferencedObjectName = name;
}
}
}
break;
}
item.Items.SetLoaded(types, true);
}
//////////////////////////////////////////////////////////////////////////
/// 3rd way:
///
/// This method demonstrates loading of metadata through .NET data providers
/// unsupported by our QueryBuilder component. If such data provider is able
/// to execute SQL queries, you can use our EventMetadataProvider with handling
/// it's ExecSQL event. In this event the EventMetadataProvider will provide
/// you SQL queries it use for the metadata retrieval. You have to execute
/// a query and return resulting data reader object.
///
/// Note: In this sample we are using SQLiteSyntaxProvider. You have to use specific syntax providers in your application,
/// e.g. MySQLSyntaxProver, OracleSyntaxProvider, etc.
//////////////////////////////////////////////////////////////////////////
public void Way3()
{
var queryBuilder1 = _aqbs.Get(instanceId);
try
{
_conn.Close();
_conn.Open();
// allow QueryBuilder to request metadata
queryBuilder1.MetadataLoadingOptions.OfflineMode = false;
ResetQueryBuilderMetadata(queryBuilder1);
queryBuilder1.SyntaxProvider = new SQLiteSyntaxProvider();
//queryBuilder1.MetadataProvider = new EventMetadataProvider();
//((EventMetadataProvider) queryBuilder1.MetadataProvider).ExecSQL += way3EventMetadataProvider_ExecSQL;
queryBuilder1.MetadataStructure.Refresh();
}
catch (Exception ex)
{
queryBuilder1.Message.Error(ex.Message);
}
}
private void way3EventMetadataProvider_ExecSQL(BaseMetadataProvider metadataProvider, string sql, bool schemaOnly, out IDataReader dataReader)
{
dataReader = null;
if (_conn != null)
{
IDbCommand command = _conn.CreateCommand();
command.CommandText = sql;
dataReader = command.ExecuteReader();
}
}
//////////////////////////////////////////////////////////////////////////
/// 4th way:
/// This method demonstrates manual filling of metadata structure from
/// stored DataSet.
//////////////////////////////////////////////////////////////////////////
public void Way4()
{
var queryBuilder1 = _aqbs.Get(instanceId);
ResetQueryBuilderMetadata(queryBuilder1);
queryBuilder1.MetadataLoadingOptions.OfflineMode = true; // prevent QueryBuilder to request metadata from connection
DataSet dataSet = new DataSet();
// Load sample dataset created in the Visual Studio with Dataset Designer
// and exported to XML using WriteXmlSchema() method.
var xml = Path.Combine(_env.WebRootPath, _config["StoredDataSetSchema"]);
dataSet.ReadXmlSchema(xml);
queryBuilder1.MetadataContainer.BeginUpdate();
try
{
queryBuilder1.ClearMetadata();
// add tables
foreach (DataTable table in dataSet.Tables)
{
// add new metadata table
MetadataObject metadataTable = queryBuilder1.MetadataContainer.AddTable(table.TableName);
// add metadata fields (columns)
foreach (DataColumn column in table.Columns)
{
// create new field
MetadataField metadataField = metadataTable.AddField(column.ColumnName);
// setup field
metadataField.FieldType = TypeToDbType(column.DataType);
metadataField.Nullable = column.AllowDBNull;
metadataField.ReadOnly = column.ReadOnly;
if (column.MaxLength != -1)
{
metadataField.Size = column.MaxLength;
}
// detect the field is primary key
foreach (DataColumn pkColumn in table.PrimaryKey)
{
if (column == pkColumn)
{
metadataField.PrimaryKey = true;
}
}
}
// add relations
foreach (DataRelation relation in table.ParentRelations)
{
// create new relation on the parent table
MetadataForeignKey metadataRelation = metadataTable.AddForeignKey(relation.RelationName);
// set referenced table
using (MetadataQualifiedName referencedName = new MetadataQualifiedName())
{
referencedName.Add(relation.ParentTable.TableName);
metadataRelation.ReferencedObjectName = referencedName;
}
// set referenced fields
foreach (DataColumn parentColumn in relation.ParentColumns)
{
metadataRelation.ReferencedFields.Add(parentColumn.ColumnName);
}
// set fields
foreach (DataColumn childColumn in relation.ChildColumns)
{
metadataRelation.Fields.Add(childColumn.ColumnName);
}
}
}
}
finally
{
queryBuilder1.MetadataContainer.EndUpdate();
}
queryBuilder1.MetadataStructure.Refresh();
}
private static DbType TypeToDbType(Type type)
{
if (type == typeof(string)) return DbType.String;
if (type == typeof(Int16)) return DbType.Int16;
if (type == typeof(Int32)) return DbType.Int32;
if (type == typeof(Int64)) return DbType.Int64;
if (type == typeof(UInt16)) return DbType.UInt16;
if (type == typeof(UInt32)) return DbType.UInt32;
if (type == typeof(UInt64)) return DbType.UInt64;
if (type == typeof(Boolean)) return DbType.Boolean;
if (type == typeof(Single)) return DbType.Single;
if (type == typeof(Double)) return DbType.Double;
if (type == typeof(Decimal)) return DbType.Decimal;
if (type == typeof(DateTime)) return DbType.DateTime;
if (type == typeof(TimeSpan)) return DbType.Time;
if (type == typeof(Byte)) return DbType.Byte;
if (type == typeof(SByte)) return DbType.SByte;
if (type == typeof(Char)) return DbType.String;
if (type == typeof(Byte[])) return DbType.Binary;
if (type == typeof(Guid)) return DbType.Guid;
return DbType.Object;
}
private void ResetQueryBuilderMetadata(QueryBuilder queryBuilder1)
{
queryBuilder1.MetadataProvider = null;
queryBuilder1.ClearMetadata();
queryBuilder1.MetadataContainer.ItemMetadataLoading -= way2ItemMetadataLoading;
}
}
} | 41.93913 | 151 | 0.502384 | [
"MIT"
] | ActiveDbSoft/active-query-builder-3-asp-net-core-samples-csharp | MVC/Controllers/LoadMetadataDemoController.cs | 14,471 | C# |
namespace UblTr.Common
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2")]
[System.Xml.Serialization.XmlRootAttribute("RegisteredTime", Namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", IsNullable = false)]
public partial class RegisteredTimeType : TimeType
{
}
} | 51.090909 | 169 | 0.768683 | [
"MIT"
] | enisgurkann/UblTr | Ubl-Tr/Common/CommonBasicComponents/RegisteredTimeType.cs | 562 | C# |
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// This source file is machine generated. Please do not change the code manually.
using System;
using System.Collections.Generic;
using System.IO.Packaging;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Drawing;
namespace DocumentFormat.OpenXml.Drawing.Diagrams
{
/// <summary>
/// <para>Color Transform Definitions. The root element of DiagramColorsPart.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:colorsDef.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>ColorDefinitionTitle <dgm:title></description></item>
///<item><description>ColorTransformDescription <dgm:desc></description></item>
///<item><description>ColorTransformCategories <dgm:catLst></description></item>
///<item><description>ColorTransformStyleLabel <dgm:styleLbl></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(ColorDefinitionTitle))]
[ChildElementInfo(typeof(ColorTransformDescription))]
[ChildElementInfo(typeof(ColorTransformCategories))]
[ChildElementInfo(typeof(ColorTransformStyleLabel))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ColorsDefinition : OpenXmlPartRootElement
{
private const string tagName = "colorsDef";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10682;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "uniqueId","minVer" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Unique ID.</para>
/// <para>Represents the following attribute in the schema: uniqueId </para>
/// </summary>
[SchemaAttr(0, "uniqueId")]
public StringValue UniqueId
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Minimum Version.</para>
/// <para>Represents the following attribute in the schema: minVer </para>
/// </summary>
[SchemaAttr(0, "minVer")]
public StringValue MinVersion
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// ColorsDefinition constructor.
/// </summary>
/// <param name="ownerPart">The owner part of the ColorsDefinition.</param>
internal ColorsDefinition(DiagramColorsPart ownerPart) : base (ownerPart )
{
}
/// <summary>
/// Loads the DOM from the DiagramColorsPart.
/// </summary>
/// <param name="openXmlPart">Specifies the part to be loaded.</param>
public void Load(DiagramColorsPart openXmlPart)
{
LoadFromPart(openXmlPart);
}
/// <summary>
/// Gets the DiagramColorsPart associated with this element.
/// </summary>
public DiagramColorsPart DiagramColorsPart
{
get
{
return OpenXmlPart as DiagramColorsPart;
}
internal set
{
OpenXmlPart = value;
}
}
/// <summary>
///Initializes a new instance of the ColorsDefinition class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorsDefinition(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorsDefinition class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorsDefinition(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorsDefinition class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public ColorsDefinition(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Initializes a new instance of the ColorsDefinition class.
/// </summary>
public ColorsDefinition() : base ()
{
}
/// <summary>
/// Saves the DOM into the DiagramColorsPart.
/// </summary>
/// <param name="openXmlPart">Specifies the part to save to.</param>
public void Save(DiagramColorsPart openXmlPart)
{
base.SaveToPart(openXmlPart);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "title" == name)
return new ColorDefinitionTitle();
if( 14 == namespaceId && "desc" == name)
return new ColorTransformDescription();
if( 14 == namespaceId && "catLst" == name)
return new ColorTransformCategories();
if( 14 == namespaceId && "styleLbl" == name)
return new ColorTransformStyleLabel();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "uniqueId" == name)
return new StringValue();
if( 0 == namespaceId && "minVer" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ColorsDefinition>(deep);
}
}
/// <summary>
/// <para>Color Transform Header.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:colorsDefHdr.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>ColorDefinitionTitle <dgm:title></description></item>
///<item><description>ColorTransformDescription <dgm:desc></description></item>
///<item><description>ColorTransformCategories <dgm:catLst></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(ColorDefinitionTitle))]
[ChildElementInfo(typeof(ColorTransformDescription))]
[ChildElementInfo(typeof(ColorTransformCategories))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ColorsDefinitionHeader : OpenXmlCompositeElement
{
private const string tagName = "colorsDefHdr";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10683;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "uniqueId","minVer","resId" };
private static byte[] attributeNamespaceIds = { 0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Unique ID.</para>
/// <para>Represents the following attribute in the schema: uniqueId </para>
/// </summary>
[SchemaAttr(0, "uniqueId")]
public StringValue UniqueId
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Minimum Version.</para>
/// <para>Represents the following attribute in the schema: minVer </para>
/// </summary>
[SchemaAttr(0, "minVer")]
public StringValue MinVersion
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Resource ID.</para>
/// <para>Represents the following attribute in the schema: resId </para>
/// </summary>
[SchemaAttr(0, "resId")]
public Int32Value ResourceId
{
get { return (Int32Value)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// Initializes a new instance of the ColorsDefinitionHeader class.
/// </summary>
public ColorsDefinitionHeader():base(){}
/// <summary>
///Initializes a new instance of the ColorsDefinitionHeader class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorsDefinitionHeader(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorsDefinitionHeader class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorsDefinitionHeader(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorsDefinitionHeader class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public ColorsDefinitionHeader(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "title" == name)
return new ColorDefinitionTitle();
if( 14 == namespaceId && "desc" == name)
return new ColorTransformDescription();
if( 14 == namespaceId && "catLst" == name)
return new ColorTransformCategories();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "uniqueId" == name)
return new StringValue();
if( 0 == namespaceId && "minVer" == name)
return new StringValue();
if( 0 == namespaceId && "resId" == name)
return new Int32Value();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ColorsDefinitionHeader>(deep);
}
}
/// <summary>
/// <para>Color Transform Header List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:colorsDefHdrLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>ColorsDefinitionHeader <dgm:colorsDefHdr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(ColorsDefinitionHeader))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ColorsDefinitionHeaderList : OpenXmlCompositeElement
{
private const string tagName = "colorsDefHdrLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10684;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the ColorsDefinitionHeaderList class.
/// </summary>
public ColorsDefinitionHeaderList():base(){}
/// <summary>
///Initializes a new instance of the ColorsDefinitionHeaderList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorsDefinitionHeaderList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorsDefinitionHeaderList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorsDefinitionHeaderList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorsDefinitionHeaderList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public ColorsDefinitionHeaderList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "colorsDefHdr" == name)
return new ColorsDefinitionHeader();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ColorsDefinitionHeaderList>(deep);
}
}
/// <summary>
/// <para>Data Model. The root element of DiagramDataPart.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:dataModel.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>PointList <dgm:ptLst></description></item>
///<item><description>ConnectionList <dgm:cxnLst></description></item>
///<item><description>Background <dgm:bg></description></item>
///<item><description>Whole <dgm:whole></description></item>
///<item><description>DataModelExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(PointList))]
[ChildElementInfo(typeof(ConnectionList))]
[ChildElementInfo(typeof(Background))]
[ChildElementInfo(typeof(Whole))]
[ChildElementInfo(typeof(DataModelExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class DataModelRoot : OpenXmlPartRootElement
{
private const string tagName = "dataModel";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10685;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// DataModelRoot constructor.
/// </summary>
/// <param name="ownerPart">The owner part of the DataModelRoot.</param>
internal DataModelRoot(DiagramDataPart ownerPart) : base (ownerPart )
{
}
/// <summary>
/// Loads the DOM from the DiagramDataPart.
/// </summary>
/// <param name="openXmlPart">Specifies the part to be loaded.</param>
public void Load(DiagramDataPart openXmlPart)
{
LoadFromPart(openXmlPart);
}
/// <summary>
/// Gets the DiagramDataPart associated with this element.
/// </summary>
public DiagramDataPart DiagramDataPart
{
get
{
return OpenXmlPart as DiagramDataPart;
}
internal set
{
OpenXmlPart = value;
}
}
/// <summary>
///Initializes a new instance of the DataModelRoot class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public DataModelRoot(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the DataModelRoot class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public DataModelRoot(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the DataModelRoot class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public DataModelRoot(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Initializes a new instance of the DataModelRoot class.
/// </summary>
public DataModelRoot() : base ()
{
}
/// <summary>
/// Saves the DOM into the DiagramDataPart.
/// </summary>
/// <param name="openXmlPart">Specifies the part to save to.</param>
public void Save(DiagramDataPart openXmlPart)
{
base.SaveToPart(openXmlPart);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "ptLst" == name)
return new PointList();
if( 14 == namespaceId && "cxnLst" == name)
return new ConnectionList();
if( 14 == namespaceId && "bg" == name)
return new Background();
if( 14 == namespaceId && "whole" == name)
return new Whole();
if( 14 == namespaceId && "extLst" == name)
return new DataModelExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "ptLst","cxnLst","bg","whole","extLst" };
private static readonly byte[] eleNamespaceIds = { 14,14,14,14,14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Point List.</para>
/// <para> Represents the following element tag in the schema: dgm:ptLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public PointList PointList
{
get
{
return GetElement<PointList>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> Connection List.</para>
/// <para> Represents the following element tag in the schema: dgm:cxnLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ConnectionList ConnectionList
{
get
{
return GetElement<ConnectionList>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// <para> Background Formatting.</para>
/// <para> Represents the following element tag in the schema: dgm:bg </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public Background Background
{
get
{
return GetElement<Background>(2);
}
set
{
SetElement(2, value);
}
}
/// <summary>
/// <para> Whole E2O Formatting.</para>
/// <para> Represents the following element tag in the schema: dgm:whole </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public Whole Whole
{
get
{
return GetElement<Whole>(3);
}
set
{
SetElement(3, value);
}
}
/// <summary>
/// <para> DataModelExtensionList.</para>
/// <para> Represents the following element tag in the schema: dgm:extLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public DataModelExtensionList DataModelExtensionList
{
get
{
return GetElement<DataModelExtensionList>(4);
}
set
{
SetElement(4, value);
}
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<DataModelRoot>(deep);
}
}
/// <summary>
/// <para>Layout Definition. The root element of DiagramLayoutDefinitionPart.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:layoutDef.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Title <dgm:title></description></item>
///<item><description>Description <dgm:desc></description></item>
///<item><description>CategoryList <dgm:catLst></description></item>
///<item><description>SampleData <dgm:sampData></description></item>
///<item><description>StyleData <dgm:styleData></description></item>
///<item><description>ColorData <dgm:clrData></description></item>
///<item><description>LayoutNode <dgm:layoutNode></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Title))]
[ChildElementInfo(typeof(Description))]
[ChildElementInfo(typeof(CategoryList))]
[ChildElementInfo(typeof(SampleData))]
[ChildElementInfo(typeof(StyleData))]
[ChildElementInfo(typeof(ColorData))]
[ChildElementInfo(typeof(LayoutNode))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class LayoutDefinition : OpenXmlPartRootElement
{
private const string tagName = "layoutDef";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10686;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "uniqueId","minVer","defStyle" };
private static byte[] attributeNamespaceIds = { 0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Unique Identifier.</para>
/// <para>Represents the following attribute in the schema: uniqueId </para>
/// </summary>
[SchemaAttr(0, "uniqueId")]
public StringValue UniqueId
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Minimum Version.</para>
/// <para>Represents the following attribute in the schema: minVer </para>
/// </summary>
[SchemaAttr(0, "minVer")]
public StringValue MinVersion
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Default Style.</para>
/// <para>Represents the following attribute in the schema: defStyle </para>
/// </summary>
[SchemaAttr(0, "defStyle")]
public StringValue DefaultStyle
{
get { return (StringValue)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// LayoutDefinition constructor.
/// </summary>
/// <param name="ownerPart">The owner part of the LayoutDefinition.</param>
internal LayoutDefinition(DiagramLayoutDefinitionPart ownerPart) : base (ownerPart )
{
}
/// <summary>
/// Loads the DOM from the DiagramLayoutDefinitionPart.
/// </summary>
/// <param name="openXmlPart">Specifies the part to be loaded.</param>
public void Load(DiagramLayoutDefinitionPart openXmlPart)
{
LoadFromPart(openXmlPart);
}
/// <summary>
/// Gets the DiagramLayoutDefinitionPart associated with this element.
/// </summary>
public DiagramLayoutDefinitionPart DiagramLayoutDefinitionPart
{
get
{
return OpenXmlPart as DiagramLayoutDefinitionPart;
}
internal set
{
OpenXmlPart = value;
}
}
/// <summary>
///Initializes a new instance of the LayoutDefinition class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public LayoutDefinition(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LayoutDefinition class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public LayoutDefinition(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LayoutDefinition class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public LayoutDefinition(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Initializes a new instance of the LayoutDefinition class.
/// </summary>
public LayoutDefinition() : base ()
{
}
/// <summary>
/// Saves the DOM into the DiagramLayoutDefinitionPart.
/// </summary>
/// <param name="openXmlPart">Specifies the part to save to.</param>
public void Save(DiagramLayoutDefinitionPart openXmlPart)
{
base.SaveToPart(openXmlPart);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "title" == name)
return new Title();
if( 14 == namespaceId && "desc" == name)
return new Description();
if( 14 == namespaceId && "catLst" == name)
return new CategoryList();
if( 14 == namespaceId && "sampData" == name)
return new SampleData();
if( 14 == namespaceId && "styleData" == name)
return new StyleData();
if( 14 == namespaceId && "clrData" == name)
return new ColorData();
if( 14 == namespaceId && "layoutNode" == name)
return new LayoutNode();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "uniqueId" == name)
return new StringValue();
if( 0 == namespaceId && "minVer" == name)
return new StringValue();
if( 0 == namespaceId && "defStyle" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<LayoutDefinition>(deep);
}
}
/// <summary>
/// <para>Layout Definition Header.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:layoutDefHdr.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Title <dgm:title></description></item>
///<item><description>Description <dgm:desc></description></item>
///<item><description>CategoryList <dgm:catLst></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Title))]
[ChildElementInfo(typeof(Description))]
[ChildElementInfo(typeof(CategoryList))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class LayoutDefinitionHeader : OpenXmlCompositeElement
{
private const string tagName = "layoutDefHdr";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10687;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "uniqueId","minVer","defStyle","resId" };
private static byte[] attributeNamespaceIds = { 0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Unique Identifier.</para>
/// <para>Represents the following attribute in the schema: uniqueId </para>
/// </summary>
[SchemaAttr(0, "uniqueId")]
public StringValue UniqueId
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Minimum Version.</para>
/// <para>Represents the following attribute in the schema: minVer </para>
/// </summary>
[SchemaAttr(0, "minVer")]
public StringValue MinVersion
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Default Style.</para>
/// <para>Represents the following attribute in the schema: defStyle </para>
/// </summary>
[SchemaAttr(0, "defStyle")]
public StringValue DefaultStyle
{
get { return (StringValue)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Resource Identifier.</para>
/// <para>Represents the following attribute in the schema: resId </para>
/// </summary>
[SchemaAttr(0, "resId")]
public Int32Value ResourceId
{
get { return (Int32Value)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// Initializes a new instance of the LayoutDefinitionHeader class.
/// </summary>
public LayoutDefinitionHeader():base(){}
/// <summary>
///Initializes a new instance of the LayoutDefinitionHeader class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public LayoutDefinitionHeader(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LayoutDefinitionHeader class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public LayoutDefinitionHeader(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LayoutDefinitionHeader class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public LayoutDefinitionHeader(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "title" == name)
return new Title();
if( 14 == namespaceId && "desc" == name)
return new Description();
if( 14 == namespaceId && "catLst" == name)
return new CategoryList();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "uniqueId" == name)
return new StringValue();
if( 0 == namespaceId && "minVer" == name)
return new StringValue();
if( 0 == namespaceId && "defStyle" == name)
return new StringValue();
if( 0 == namespaceId && "resId" == name)
return new Int32Value();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<LayoutDefinitionHeader>(deep);
}
}
/// <summary>
/// <para>Diagram Layout Header List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:layoutDefHdrLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>LayoutDefinitionHeader <dgm:layoutDefHdr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(LayoutDefinitionHeader))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class LayoutDefinitionHeaderList : OpenXmlCompositeElement
{
private const string tagName = "layoutDefHdrLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10688;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the LayoutDefinitionHeaderList class.
/// </summary>
public LayoutDefinitionHeaderList():base(){}
/// <summary>
///Initializes a new instance of the LayoutDefinitionHeaderList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public LayoutDefinitionHeaderList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LayoutDefinitionHeaderList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public LayoutDefinitionHeaderList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LayoutDefinitionHeaderList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public LayoutDefinitionHeaderList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "layoutDefHdr" == name)
return new LayoutDefinitionHeader();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<LayoutDefinitionHeaderList>(deep);
}
}
/// <summary>
/// <para>Explicit Relationships to Diagram Parts.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:relIds.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class RelationshipIds : OpenXmlLeafElement
{
private const string tagName = "relIds";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10689;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "dm","lo","qs","cs" };
private static byte[] attributeNamespaceIds = { 19,19,19,19 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Explicit Relationship to Diagram Data Part.</para>
/// <para>Represents the following attribute in the schema: r:dm </para>
/// </summary>
///<remark> xmlns:r=http://schemas.openxmlformats.org/officeDocument/2006/relationships
///</remark>
[SchemaAttr(19, "dm")]
public StringValue DataPart
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Explicit Relationship to Diagram Layout Definition Part.</para>
/// <para>Represents the following attribute in the schema: r:lo </para>
/// </summary>
///<remark> xmlns:r=http://schemas.openxmlformats.org/officeDocument/2006/relationships
///</remark>
[SchemaAttr(19, "lo")]
public StringValue LayoutPart
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Explicit Relationship to Style Definition Part.</para>
/// <para>Represents the following attribute in the schema: r:qs </para>
/// </summary>
///<remark> xmlns:r=http://schemas.openxmlformats.org/officeDocument/2006/relationships
///</remark>
[SchemaAttr(19, "qs")]
public StringValue StylePart
{
get { return (StringValue)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Explicit Relationship to Diagram Colors Part.</para>
/// <para>Represents the following attribute in the schema: r:cs </para>
/// </summary>
///<remark> xmlns:r=http://schemas.openxmlformats.org/officeDocument/2006/relationships
///</remark>
[SchemaAttr(19, "cs")]
public StringValue ColorPart
{
get { return (StringValue)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// Initializes a new instance of the RelationshipIds class.
/// </summary>
public RelationshipIds():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 19 == namespaceId && "dm" == name)
return new StringValue();
if( 19 == namespaceId && "lo" == name)
return new StringValue();
if( 19 == namespaceId && "qs" == name)
return new StringValue();
if( 19 == namespaceId && "cs" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<RelationshipIds>(deep);
}
}
/// <summary>
/// <para>Style Definition. The root element of DiagramStylePart.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:styleDef.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>StyleDefinitionTitle <dgm:title></description></item>
///<item><description>StyleLabelDescription <dgm:desc></description></item>
///<item><description>StyleDisplayCategories <dgm:catLst></description></item>
///<item><description>Scene3D <dgm:scene3d></description></item>
///<item><description>StyleLabel <dgm:styleLbl></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(StyleDefinitionTitle))]
[ChildElementInfo(typeof(StyleLabelDescription))]
[ChildElementInfo(typeof(StyleDisplayCategories))]
[ChildElementInfo(typeof(Scene3D))]
[ChildElementInfo(typeof(StyleLabel))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class StyleDefinition : OpenXmlPartRootElement
{
private const string tagName = "styleDef";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10690;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "uniqueId","minVer" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Unique Style ID.</para>
/// <para>Represents the following attribute in the schema: uniqueId </para>
/// </summary>
[SchemaAttr(0, "uniqueId")]
public StringValue UniqueId
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Minimum Version.</para>
/// <para>Represents the following attribute in the schema: minVer </para>
/// </summary>
[SchemaAttr(0, "minVer")]
public StringValue MinVersion
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// StyleDefinition constructor.
/// </summary>
/// <param name="ownerPart">The owner part of the StyleDefinition.</param>
internal StyleDefinition(DiagramStylePart ownerPart) : base (ownerPart )
{
}
/// <summary>
/// Loads the DOM from the DiagramStylePart.
/// </summary>
/// <param name="openXmlPart">Specifies the part to be loaded.</param>
public void Load(DiagramStylePart openXmlPart)
{
LoadFromPart(openXmlPart);
}
/// <summary>
/// Gets the DiagramStylePart associated with this element.
/// </summary>
public DiagramStylePart DiagramStylePart
{
get
{
return OpenXmlPart as DiagramStylePart;
}
internal set
{
OpenXmlPart = value;
}
}
/// <summary>
///Initializes a new instance of the StyleDefinition class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleDefinition(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleDefinition class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleDefinition(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleDefinition class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public StyleDefinition(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Initializes a new instance of the StyleDefinition class.
/// </summary>
public StyleDefinition() : base ()
{
}
/// <summary>
/// Saves the DOM into the DiagramStylePart.
/// </summary>
/// <param name="openXmlPart">Specifies the part to save to.</param>
public void Save(DiagramStylePart openXmlPart)
{
base.SaveToPart(openXmlPart);
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "title" == name)
return new StyleDefinitionTitle();
if( 14 == namespaceId && "desc" == name)
return new StyleLabelDescription();
if( 14 == namespaceId && "catLst" == name)
return new StyleDisplayCategories();
if( 14 == namespaceId && "scene3d" == name)
return new Scene3D();
if( 14 == namespaceId && "styleLbl" == name)
return new StyleLabel();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "uniqueId" == name)
return new StringValue();
if( 0 == namespaceId && "minVer" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<StyleDefinition>(deep);
}
}
/// <summary>
/// <para>Style Definition Header.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:styleDefHdr.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>StyleDefinitionTitle <dgm:title></description></item>
///<item><description>StyleLabelDescription <dgm:desc></description></item>
///<item><description>StyleDisplayCategories <dgm:catLst></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(StyleDefinitionTitle))]
[ChildElementInfo(typeof(StyleLabelDescription))]
[ChildElementInfo(typeof(StyleDisplayCategories))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class StyleDefinitionHeader : OpenXmlCompositeElement
{
private const string tagName = "styleDefHdr";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10691;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "uniqueId","minVer","resId" };
private static byte[] attributeNamespaceIds = { 0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Unique Style ID.</para>
/// <para>Represents the following attribute in the schema: uniqueId </para>
/// </summary>
[SchemaAttr(0, "uniqueId")]
public StringValue UniqueId
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Minimum Version.</para>
/// <para>Represents the following attribute in the schema: minVer </para>
/// </summary>
[SchemaAttr(0, "minVer")]
public StringValue MinVersion
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Resource ID.</para>
/// <para>Represents the following attribute in the schema: resId </para>
/// </summary>
[SchemaAttr(0, "resId")]
public Int32Value ResourceId
{
get { return (Int32Value)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// Initializes a new instance of the StyleDefinitionHeader class.
/// </summary>
public StyleDefinitionHeader():base(){}
/// <summary>
///Initializes a new instance of the StyleDefinitionHeader class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleDefinitionHeader(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleDefinitionHeader class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleDefinitionHeader(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleDefinitionHeader class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public StyleDefinitionHeader(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "title" == name)
return new StyleDefinitionTitle();
if( 14 == namespaceId && "desc" == name)
return new StyleLabelDescription();
if( 14 == namespaceId && "catLst" == name)
return new StyleDisplayCategories();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "uniqueId" == name)
return new StringValue();
if( 0 == namespaceId && "minVer" == name)
return new StringValue();
if( 0 == namespaceId && "resId" == name)
return new Int32Value();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<StyleDefinitionHeader>(deep);
}
}
/// <summary>
/// <para>List of Style Definition Headers.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:styleDefHdrLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>StyleDefinitionHeader <dgm:styleDefHdr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(StyleDefinitionHeader))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class StyleDefinitionHeaderList : OpenXmlCompositeElement
{
private const string tagName = "styleDefHdrLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10692;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the StyleDefinitionHeaderList class.
/// </summary>
public StyleDefinitionHeaderList():base(){}
/// <summary>
///Initializes a new instance of the StyleDefinitionHeaderList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleDefinitionHeaderList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleDefinitionHeaderList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleDefinitionHeaderList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleDefinitionHeaderList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public StyleDefinitionHeaderList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "styleDefHdr" == name)
return new StyleDefinitionHeader();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<StyleDefinitionHeaderList>(deep);
}
}
/// <summary>
/// <para>Color Transform Category.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:cat.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ColorTransformCategory : OpenXmlLeafElement
{
private const string tagName = "cat";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10693;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "type","pri" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Category Type.</para>
/// <para>Represents the following attribute in the schema: type </para>
/// </summary>
[SchemaAttr(0, "type")]
public StringValue Type
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Priority.</para>
/// <para>Represents the following attribute in the schema: pri </para>
/// </summary>
[SchemaAttr(0, "pri")]
public UInt32Value Priority
{
get { return (UInt32Value)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the ColorTransformCategory class.
/// </summary>
public ColorTransformCategory():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "type" == name)
return new StringValue();
if( 0 == namespaceId && "pri" == name)
return new UInt32Value();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ColorTransformCategory>(deep);
}
}
/// <summary>
/// <para>Fill Color List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:fillClrLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelPercentage <a:scrgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelHex <a:srgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.HslColor <a:hslClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SystemColor <a:sysClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SchemeColor <a:schemeClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.PresetColor <a:prstClr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class FillColorList : ColorsType
{
private const string tagName = "fillClrLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10694;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the FillColorList class.
/// </summary>
public FillColorList():base(){}
/// <summary>
///Initializes a new instance of the FillColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public FillColorList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the FillColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public FillColorList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the FillColorList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public FillColorList(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<FillColorList>(deep);
}
}
/// <summary>
/// <para>Line Color List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:linClrLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelPercentage <a:scrgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelHex <a:srgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.HslColor <a:hslClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SystemColor <a:sysClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SchemeColor <a:schemeClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.PresetColor <a:prstClr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class LineColorList : ColorsType
{
private const string tagName = "linClrLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10695;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the LineColorList class.
/// </summary>
public LineColorList():base(){}
/// <summary>
///Initializes a new instance of the LineColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public LineColorList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LineColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public LineColorList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LineColorList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public LineColorList(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<LineColorList>(deep);
}
}
/// <summary>
/// <para>Effect Color List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:effectClrLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelPercentage <a:scrgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelHex <a:srgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.HslColor <a:hslClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SystemColor <a:sysClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SchemeColor <a:schemeClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.PresetColor <a:prstClr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class EffectColorList : ColorsType
{
private const string tagName = "effectClrLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10696;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the EffectColorList class.
/// </summary>
public EffectColorList():base(){}
/// <summary>
///Initializes a new instance of the EffectColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public EffectColorList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the EffectColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public EffectColorList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the EffectColorList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public EffectColorList(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<EffectColorList>(deep);
}
}
/// <summary>
/// <para>Text Line Color List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:txLinClrLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelPercentage <a:scrgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelHex <a:srgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.HslColor <a:hslClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SystemColor <a:sysClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SchemeColor <a:schemeClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.PresetColor <a:prstClr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class TextLineColorList : ColorsType
{
private const string tagName = "txLinClrLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10697;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the TextLineColorList class.
/// </summary>
public TextLineColorList():base(){}
/// <summary>
///Initializes a new instance of the TextLineColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public TextLineColorList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the TextLineColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public TextLineColorList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the TextLineColorList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public TextLineColorList(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<TextLineColorList>(deep);
}
}
/// <summary>
/// <para>Text Fill Color List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:txFillClrLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelPercentage <a:scrgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelHex <a:srgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.HslColor <a:hslClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SystemColor <a:sysClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SchemeColor <a:schemeClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.PresetColor <a:prstClr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class TextFillColorList : ColorsType
{
private const string tagName = "txFillClrLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10698;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the TextFillColorList class.
/// </summary>
public TextFillColorList():base(){}
/// <summary>
///Initializes a new instance of the TextFillColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public TextFillColorList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the TextFillColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public TextFillColorList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the TextFillColorList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public TextFillColorList(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<TextFillColorList>(deep);
}
}
/// <summary>
/// <para>Text Effect Color List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:txEffectClrLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelPercentage <a:scrgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelHex <a:srgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.HslColor <a:hslClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SystemColor <a:sysClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SchemeColor <a:schemeClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.PresetColor <a:prstClr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class TextEffectColorList : ColorsType
{
private const string tagName = "txEffectClrLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10699;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the TextEffectColorList class.
/// </summary>
public TextEffectColorList():base(){}
/// <summary>
///Initializes a new instance of the TextEffectColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public TextEffectColorList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the TextEffectColorList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public TextEffectColorList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the TextEffectColorList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public TextEffectColorList(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<TextEffectColorList>(deep);
}
}
/// <summary>
/// Defines the ColorsType class.
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelPercentage <a:scrgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.RgbColorModelHex <a:srgbClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.HslColor <a:hslClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SystemColor <a:sysClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SchemeColor <a:schemeClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.PresetColor <a:prstClr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.RgbColorModelPercentage))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.RgbColorModelHex))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.HslColor))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.SystemColor))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.SchemeColor))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.PresetColor))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public abstract partial class ColorsType : OpenXmlCompositeElement
{
private static string[] attributeTagNames = { "meth","hueDir" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Color Application Method Type.</para>
/// <para>Represents the following attribute in the schema: meth </para>
/// </summary>
[SchemaAttr(0, "meth")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ColorApplicationMethodValues> Method
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ColorApplicationMethodValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Hue Direction.</para>
/// <para>Represents the following attribute in the schema: hueDir </para>
/// </summary>
[SchemaAttr(0, "hueDir")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.HueDirectionValues> HueDirection
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.HueDirectionValues>)Attributes[1]; }
set { Attributes[1] = value; }
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "scrgbClr" == name)
return new DocumentFormat.OpenXml.Drawing.RgbColorModelPercentage();
if( 10 == namespaceId && "srgbClr" == name)
return new DocumentFormat.OpenXml.Drawing.RgbColorModelHex();
if( 10 == namespaceId && "hslClr" == name)
return new DocumentFormat.OpenXml.Drawing.HslColor();
if( 10 == namespaceId && "sysClr" == name)
return new DocumentFormat.OpenXml.Drawing.SystemColor();
if( 10 == namespaceId && "schemeClr" == name)
return new DocumentFormat.OpenXml.Drawing.SchemeColor();
if( 10 == namespaceId && "prstClr" == name)
return new DocumentFormat.OpenXml.Drawing.PresetColor();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "meth" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ColorApplicationMethodValues>();
if( 0 == namespaceId && "hueDir" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.HueDirectionValues>();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Initializes a new instance of the ColorsType class.
/// </summary>
protected ColorsType(){}
/// <summary>
///Initializes a new instance of the ColorsType class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
protected ColorsType(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorsType class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
protected ColorsType(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorsType class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
protected ColorsType(string outerXml)
: base(outerXml)
{
}
}
/// <summary>
/// <para>Defines the ExtensionList Class.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:extLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.Extension <a:ext></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.Extension))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ExtensionList : OpenXmlCompositeElement
{
private const string tagName = "extLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10700;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the ExtensionList class.
/// </summary>
public ExtensionList():base(){}
/// <summary>
///Initializes a new instance of the ExtensionList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ExtensionList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ExtensionList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ExtensionList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ExtensionList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public ExtensionList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "ext" == name)
return new DocumentFormat.OpenXml.Drawing.Extension();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ExtensionList>(deep);
}
}
/// <summary>
/// <para>Title.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:title.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ColorDefinitionTitle : OpenXmlLeafElement
{
private const string tagName = "title";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10701;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "lang","val" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Language.</para>
/// <para>Represents the following attribute in the schema: lang </para>
/// </summary>
[SchemaAttr(0, "lang")]
public StringValue Language
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Description Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public StringValue Val
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the ColorDefinitionTitle class.
/// </summary>
public ColorDefinitionTitle():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "lang" == name)
return new StringValue();
if( 0 == namespaceId && "val" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ColorDefinitionTitle>(deep);
}
}
/// <summary>
/// <para>Description.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:desc.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ColorTransformDescription : OpenXmlLeafElement
{
private const string tagName = "desc";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10702;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "lang","val" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Language.</para>
/// <para>Represents the following attribute in the schema: lang </para>
/// </summary>
[SchemaAttr(0, "lang")]
public StringValue Language
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Description Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public StringValue Val
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the ColorTransformDescription class.
/// </summary>
public ColorTransformDescription():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "lang" == name)
return new StringValue();
if( 0 == namespaceId && "val" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ColorTransformDescription>(deep);
}
}
/// <summary>
/// <para>Color Transform Category List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:catLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>ColorTransformCategory <dgm:cat></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(ColorTransformCategory))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ColorTransformCategories : OpenXmlCompositeElement
{
private const string tagName = "catLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10703;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the ColorTransformCategories class.
/// </summary>
public ColorTransformCategories():base(){}
/// <summary>
///Initializes a new instance of the ColorTransformCategories class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorTransformCategories(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorTransformCategories class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorTransformCategories(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorTransformCategories class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public ColorTransformCategories(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "cat" == name)
return new ColorTransformCategory();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ColorTransformCategories>(deep);
}
}
/// <summary>
/// <para>Style Label.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:styleLbl.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>FillColorList <dgm:fillClrLst></description></item>
///<item><description>LineColorList <dgm:linClrLst></description></item>
///<item><description>EffectColorList <dgm:effectClrLst></description></item>
///<item><description>TextLineColorList <dgm:txLinClrLst></description></item>
///<item><description>TextFillColorList <dgm:txFillClrLst></description></item>
///<item><description>TextEffectColorList <dgm:txEffectClrLst></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(FillColorList))]
[ChildElementInfo(typeof(LineColorList))]
[ChildElementInfo(typeof(EffectColorList))]
[ChildElementInfo(typeof(TextLineColorList))]
[ChildElementInfo(typeof(TextFillColorList))]
[ChildElementInfo(typeof(TextEffectColorList))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ColorTransformStyleLabel : OpenXmlCompositeElement
{
private const string tagName = "styleLbl";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10704;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "name" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Name.</para>
/// <para>Represents the following attribute in the schema: name </para>
/// </summary>
[SchemaAttr(0, "name")]
public StringValue Name
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the ColorTransformStyleLabel class.
/// </summary>
public ColorTransformStyleLabel():base(){}
/// <summary>
///Initializes a new instance of the ColorTransformStyleLabel class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorTransformStyleLabel(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorTransformStyleLabel class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorTransformStyleLabel(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorTransformStyleLabel class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public ColorTransformStyleLabel(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "fillClrLst" == name)
return new FillColorList();
if( 14 == namespaceId && "linClrLst" == name)
return new LineColorList();
if( 14 == namespaceId && "effectClrLst" == name)
return new EffectColorList();
if( 14 == namespaceId && "txLinClrLst" == name)
return new TextLineColorList();
if( 14 == namespaceId && "txFillClrLst" == name)
return new TextFillColorList();
if( 14 == namespaceId && "txEffectClrLst" == name)
return new TextEffectColorList();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "fillClrLst","linClrLst","effectClrLst","txLinClrLst","txFillClrLst","txEffectClrLst","extLst" };
private static readonly byte[] eleNamespaceIds = { 14,14,14,14,14,14,14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Fill Color List.</para>
/// <para> Represents the following element tag in the schema: dgm:fillClrLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public FillColorList FillColorList
{
get
{
return GetElement<FillColorList>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> Line Color List.</para>
/// <para> Represents the following element tag in the schema: dgm:linClrLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public LineColorList LineColorList
{
get
{
return GetElement<LineColorList>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// <para> Effect Color List.</para>
/// <para> Represents the following element tag in the schema: dgm:effectClrLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public EffectColorList EffectColorList
{
get
{
return GetElement<EffectColorList>(2);
}
set
{
SetElement(2, value);
}
}
/// <summary>
/// <para> Text Line Color List.</para>
/// <para> Represents the following element tag in the schema: dgm:txLinClrLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public TextLineColorList TextLineColorList
{
get
{
return GetElement<TextLineColorList>(3);
}
set
{
SetElement(3, value);
}
}
/// <summary>
/// <para> Text Fill Color List.</para>
/// <para> Represents the following element tag in the schema: dgm:txFillClrLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public TextFillColorList TextFillColorList
{
get
{
return GetElement<TextFillColorList>(4);
}
set
{
SetElement(4, value);
}
}
/// <summary>
/// <para> Text Effect Color List.</para>
/// <para> Represents the following element tag in the schema: dgm:txEffectClrLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public TextEffectColorList TextEffectColorList
{
get
{
return GetElement<TextEffectColorList>(5);
}
set
{
SetElement(5, value);
}
}
/// <summary>
/// <para> ExtensionList.</para>
/// <para> Represents the following element tag in the schema: dgm:extLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ExtensionList ExtensionList
{
get
{
return GetElement<ExtensionList>(6);
}
set
{
SetElement(6, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "name" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ColorTransformStyleLabel>(deep);
}
}
/// <summary>
/// <para>Point.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:pt.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>PropertySet <dgm:prSet></description></item>
///<item><description>ShapeProperties <dgm:spPr></description></item>
///<item><description>TextBody <dgm:t></description></item>
///<item><description>PtExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(PropertySet))]
[ChildElementInfo(typeof(ShapeProperties))]
[ChildElementInfo(typeof(TextBody))]
[ChildElementInfo(typeof(PtExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Point : OpenXmlCompositeElement
{
private const string tagName = "pt";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10705;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "modelId","type","cxnId" };
private static byte[] attributeNamespaceIds = { 0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Model Identifier.</para>
/// <para>Represents the following attribute in the schema: modelId </para>
/// </summary>
[SchemaAttr(0, "modelId")]
public StringValue ModelId
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Point Type.</para>
/// <para>Represents the following attribute in the schema: type </para>
/// </summary>
[SchemaAttr(0, "type")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.PointValues> Type
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.PointValues>)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Connection Identifier.</para>
/// <para>Represents the following attribute in the schema: cxnId </para>
/// </summary>
[SchemaAttr(0, "cxnId")]
public StringValue ConnectionId
{
get { return (StringValue)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// Initializes a new instance of the Point class.
/// </summary>
public Point():base(){}
/// <summary>
///Initializes a new instance of the Point class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Point(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Point class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Point(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Point class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Point(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "prSet" == name)
return new PropertySet();
if( 14 == namespaceId && "spPr" == name)
return new ShapeProperties();
if( 14 == namespaceId && "t" == name)
return new TextBody();
if( 14 == namespaceId && "extLst" == name)
return new PtExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "prSet","spPr","t","extLst" };
private static readonly byte[] eleNamespaceIds = { 14,14,14,14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Property Set.</para>
/// <para> Represents the following element tag in the schema: dgm:prSet </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public PropertySet PropertySet
{
get
{
return GetElement<PropertySet>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> Shape Properties.</para>
/// <para> Represents the following element tag in the schema: dgm:spPr </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ShapeProperties ShapeProperties
{
get
{
return GetElement<ShapeProperties>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// <para> Text Body.</para>
/// <para> Represents the following element tag in the schema: dgm:t </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public TextBody TextBody
{
get
{
return GetElement<TextBody>(2);
}
set
{
SetElement(2, value);
}
}
/// <summary>
/// <para> PtExtensionList.</para>
/// <para> Represents the following element tag in the schema: dgm:extLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public PtExtensionList PtExtensionList
{
get
{
return GetElement<PtExtensionList>(3);
}
set
{
SetElement(3, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "modelId" == name)
return new StringValue();
if( 0 == namespaceId && "type" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.PointValues>();
if( 0 == namespaceId && "cxnId" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Point>(deep);
}
}
/// <summary>
/// <para>Connection.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:cxn.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Connection : OpenXmlCompositeElement
{
private const string tagName = "cxn";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10706;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "modelId","type","srcId","destId","srcOrd","destOrd","parTransId","sibTransId","presId" };
private static byte[] attributeNamespaceIds = { 0,0,0,0,0,0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Model Identifier.</para>
/// <para>Represents the following attribute in the schema: modelId </para>
/// </summary>
[SchemaAttr(0, "modelId")]
public StringValue ModelId
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Point Type.</para>
/// <para>Represents the following attribute in the schema: type </para>
/// </summary>
[SchemaAttr(0, "type")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConnectionValues> Type
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConnectionValues>)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Source Identifier.</para>
/// <para>Represents the following attribute in the schema: srcId </para>
/// </summary>
[SchemaAttr(0, "srcId")]
public StringValue SourceId
{
get { return (StringValue)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Destination Identifier.</para>
/// <para>Represents the following attribute in the schema: destId </para>
/// </summary>
[SchemaAttr(0, "destId")]
public StringValue DestinationId
{
get { return (StringValue)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// <para> Source Position.</para>
/// <para>Represents the following attribute in the schema: srcOrd </para>
/// </summary>
[SchemaAttr(0, "srcOrd")]
public UInt32Value SourcePosition
{
get { return (UInt32Value)Attributes[4]; }
set { Attributes[4] = value; }
}
/// <summary>
/// <para> Destination Position.</para>
/// <para>Represents the following attribute in the schema: destOrd </para>
/// </summary>
[SchemaAttr(0, "destOrd")]
public UInt32Value DestinationPosition
{
get { return (UInt32Value)Attributes[5]; }
set { Attributes[5] = value; }
}
/// <summary>
/// <para> Parent Transition Identifier.</para>
/// <para>Represents the following attribute in the schema: parTransId </para>
/// </summary>
[SchemaAttr(0, "parTransId")]
public StringValue ParentTransitionId
{
get { return (StringValue)Attributes[6]; }
set { Attributes[6] = value; }
}
/// <summary>
/// <para> Sibling Transition Identifier.</para>
/// <para>Represents the following attribute in the schema: sibTransId </para>
/// </summary>
[SchemaAttr(0, "sibTransId")]
public StringValue SiblingTransitionId
{
get { return (StringValue)Attributes[7]; }
set { Attributes[7] = value; }
}
/// <summary>
/// <para> Presentation Identifier.</para>
/// <para>Represents the following attribute in the schema: presId </para>
/// </summary>
[SchemaAttr(0, "presId")]
public StringValue PresentationId
{
get { return (StringValue)Attributes[8]; }
set { Attributes[8] = value; }
}
/// <summary>
/// Initializes a new instance of the Connection class.
/// </summary>
public Connection():base(){}
/// <summary>
///Initializes a new instance of the Connection class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Connection(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Connection class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Connection(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Connection class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Connection(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "extLst" };
private static readonly byte[] eleNamespaceIds = { 14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> ExtensionList.</para>
/// <para> Represents the following element tag in the schema: dgm:extLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ExtensionList ExtensionList
{
get
{
return GetElement<ExtensionList>(0);
}
set
{
SetElement(0, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "modelId" == name)
return new StringValue();
if( 0 == namespaceId && "type" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConnectionValues>();
if( 0 == namespaceId && "srcId" == name)
return new StringValue();
if( 0 == namespaceId && "destId" == name)
return new StringValue();
if( 0 == namespaceId && "srcOrd" == name)
return new UInt32Value();
if( 0 == namespaceId && "destOrd" == name)
return new UInt32Value();
if( 0 == namespaceId && "parTransId" == name)
return new StringValue();
if( 0 == namespaceId && "sibTransId" == name)
return new StringValue();
if( 0 == namespaceId && "presId" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Connection>(deep);
}
}
/// <summary>
/// <para>Constraint.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:constr.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Constraint : OpenXmlCompositeElement
{
private const string tagName = "constr";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10707;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "type","for","forName","ptType","refType","refFor","refForName","refPtType","op","val","fact" };
private static byte[] attributeNamespaceIds = { 0,0,0,0,0,0,0,0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Constraint Type.</para>
/// <para>Represents the following attribute in the schema: type </para>
/// </summary>
[SchemaAttr(0, "type")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintValues> Type
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> For.</para>
/// <para>Represents the following attribute in the schema: for </para>
/// </summary>
[SchemaAttr(0, "for")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintRelationshipValues> For
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintRelationshipValues>)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> For Name.</para>
/// <para>Represents the following attribute in the schema: forName </para>
/// </summary>
[SchemaAttr(0, "forName")]
public StringValue ForName
{
get { return (StringValue)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Data Point Type.</para>
/// <para>Represents the following attribute in the schema: ptType </para>
/// </summary>
[SchemaAttr(0, "ptType")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues> PointType
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// <para> Reference Type.</para>
/// <para>Represents the following attribute in the schema: refType </para>
/// </summary>
[SchemaAttr(0, "refType")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintValues> ReferenceType
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintValues>)Attributes[4]; }
set { Attributes[4] = value; }
}
/// <summary>
/// <para> Reference For.</para>
/// <para>Represents the following attribute in the schema: refFor </para>
/// </summary>
[SchemaAttr(0, "refFor")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintRelationshipValues> ReferenceFor
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintRelationshipValues>)Attributes[5]; }
set { Attributes[5] = value; }
}
/// <summary>
/// <para> Reference For Name.</para>
/// <para>Represents the following attribute in the schema: refForName </para>
/// </summary>
[SchemaAttr(0, "refForName")]
public StringValue ReferenceForName
{
get { return (StringValue)Attributes[6]; }
set { Attributes[6] = value; }
}
/// <summary>
/// <para> Reference Point Type.</para>
/// <para>Represents the following attribute in the schema: refPtType </para>
/// </summary>
[SchemaAttr(0, "refPtType")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues> ReferencePointType
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>)Attributes[7]; }
set { Attributes[7] = value; }
}
/// <summary>
/// <para> Operator.</para>
/// <para>Represents the following attribute in the schema: op </para>
/// </summary>
[SchemaAttr(0, "op")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.BoolOperatorValues> Operator
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.BoolOperatorValues>)Attributes[8]; }
set { Attributes[8] = value; }
}
/// <summary>
/// <para> Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public DoubleValue Val
{
get { return (DoubleValue)Attributes[9]; }
set { Attributes[9] = value; }
}
/// <summary>
/// <para> Factor.</para>
/// <para>Represents the following attribute in the schema: fact </para>
/// </summary>
[SchemaAttr(0, "fact")]
public DoubleValue Fact
{
get { return (DoubleValue)Attributes[10]; }
set { Attributes[10] = value; }
}
/// <summary>
/// Initializes a new instance of the Constraint class.
/// </summary>
public Constraint():base(){}
/// <summary>
///Initializes a new instance of the Constraint class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Constraint(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Constraint class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Constraint(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Constraint class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Constraint(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "extLst" };
private static readonly byte[] eleNamespaceIds = { 14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> ExtensionList.</para>
/// <para> Represents the following element tag in the schema: dgm:extLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ExtensionList ExtensionList
{
get
{
return GetElement<ExtensionList>(0);
}
set
{
SetElement(0, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "type" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintValues>();
if( 0 == namespaceId && "for" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintRelationshipValues>();
if( 0 == namespaceId && "forName" == name)
return new StringValue();
if( 0 == namespaceId && "ptType" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>();
if( 0 == namespaceId && "refType" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintValues>();
if( 0 == namespaceId && "refFor" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintRelationshipValues>();
if( 0 == namespaceId && "refForName" == name)
return new StringValue();
if( 0 == namespaceId && "refPtType" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>();
if( 0 == namespaceId && "op" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.BoolOperatorValues>();
if( 0 == namespaceId && "val" == name)
return new DoubleValue();
if( 0 == namespaceId && "fact" == name)
return new DoubleValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Constraint>(deep);
}
}
/// <summary>
/// <para>Rule.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:rule.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Rule : OpenXmlCompositeElement
{
private const string tagName = "rule";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10708;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "type","for","forName","ptType","val","fact","max" };
private static byte[] attributeNamespaceIds = { 0,0,0,0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Constraint Type.</para>
/// <para>Represents the following attribute in the schema: type </para>
/// </summary>
[SchemaAttr(0, "type")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintValues> Type
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> For.</para>
/// <para>Represents the following attribute in the schema: for </para>
/// </summary>
[SchemaAttr(0, "for")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintRelationshipValues> For
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintRelationshipValues>)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> For Name.</para>
/// <para>Represents the following attribute in the schema: forName </para>
/// </summary>
[SchemaAttr(0, "forName")]
public StringValue ForName
{
get { return (StringValue)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Data Point Type.</para>
/// <para>Represents the following attribute in the schema: ptType </para>
/// </summary>
[SchemaAttr(0, "ptType")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues> PointType
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// <para> Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public DoubleValue Val
{
get { return (DoubleValue)Attributes[4]; }
set { Attributes[4] = value; }
}
/// <summary>
/// <para> Factor.</para>
/// <para>Represents the following attribute in the schema: fact </para>
/// </summary>
[SchemaAttr(0, "fact")]
public DoubleValue Fact
{
get { return (DoubleValue)Attributes[5]; }
set { Attributes[5] = value; }
}
/// <summary>
/// <para> Max Value.</para>
/// <para>Represents the following attribute in the schema: max </para>
/// </summary>
[SchemaAttr(0, "max")]
public DoubleValue Max
{
get { return (DoubleValue)Attributes[6]; }
set { Attributes[6] = value; }
}
/// <summary>
/// Initializes a new instance of the Rule class.
/// </summary>
public Rule():base(){}
/// <summary>
///Initializes a new instance of the Rule class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Rule(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Rule class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Rule(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Rule class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Rule(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "extLst" };
private static readonly byte[] eleNamespaceIds = { 14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> ExtensionList.</para>
/// <para> Represents the following element tag in the schema: dgm:extLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ExtensionList ExtensionList
{
get
{
return GetElement<ExtensionList>(0);
}
set
{
SetElement(0, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "type" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintValues>();
if( 0 == namespaceId && "for" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ConstraintRelationshipValues>();
if( 0 == namespaceId && "forName" == name)
return new StringValue();
if( 0 == namespaceId && "ptType" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>();
if( 0 == namespaceId && "val" == name)
return new DoubleValue();
if( 0 == namespaceId && "fact" == name)
return new DoubleValue();
if( 0 == namespaceId && "max" == name)
return new DoubleValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Rule>(deep);
}
}
/// <summary>
/// <para>Shape Adjust.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:adj.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Adjust : OpenXmlLeafElement
{
private const string tagName = "adj";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10709;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "idx","val" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Adjust Handle Index.</para>
/// <para>Represents the following attribute in the schema: idx </para>
/// </summary>
[SchemaAttr(0, "idx")]
public UInt32Value Index
{
get { return (UInt32Value)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public DoubleValue Val
{
get { return (DoubleValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the Adjust class.
/// </summary>
public Adjust():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "idx" == name)
return new UInt32Value();
if( 0 == namespaceId && "val" == name)
return new DoubleValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Adjust>(deep);
}
}
/// <summary>
/// <para>Shape Adjust List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:adjLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Adjust <dgm:adj></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Adjust))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class AdjustList : OpenXmlCompositeElement
{
private const string tagName = "adjLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10710;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the AdjustList class.
/// </summary>
public AdjustList():base(){}
/// <summary>
///Initializes a new instance of the AdjustList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public AdjustList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the AdjustList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public AdjustList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the AdjustList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public AdjustList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "adj" == name)
return new Adjust();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<AdjustList>(deep);
}
}
/// <summary>
/// <para>Parameter.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:param.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Parameter : OpenXmlLeafElement
{
private const string tagName = "param";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10711;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "type","val" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Parameter Type.</para>
/// <para>Represents the following attribute in the schema: type </para>
/// </summary>
[SchemaAttr(0, "type")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ParameterIdValues> Type
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ParameterIdValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public StringValue Val
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the Parameter class.
/// </summary>
public Parameter():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "type" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ParameterIdValues>();
if( 0 == namespaceId && "val" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Parameter>(deep);
}
}
/// <summary>
/// <para>Algorithm.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:alg.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Parameter <dgm:param></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Parameter))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Algorithm : OpenXmlCompositeElement
{
private const string tagName = "alg";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10712;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "type","rev" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Algorithm Type.</para>
/// <para>Represents the following attribute in the schema: type </para>
/// </summary>
[SchemaAttr(0, "type")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AlgorithmValues> Type
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AlgorithmValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Revision Number.</para>
/// <para>Represents the following attribute in the schema: rev </para>
/// </summary>
[SchemaAttr(0, "rev")]
public UInt32Value Revision
{
get { return (UInt32Value)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the Algorithm class.
/// </summary>
public Algorithm():base(){}
/// <summary>
///Initializes a new instance of the Algorithm class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Algorithm(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Algorithm class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Algorithm(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Algorithm class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Algorithm(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "param" == name)
return new Parameter();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "type" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AlgorithmValues>();
if( 0 == namespaceId && "rev" == name)
return new UInt32Value();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Algorithm>(deep);
}
}
/// <summary>
/// <para>Shape.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:shape.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>AdjustList <dgm:adjLst></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(AdjustList))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Shape : OpenXmlCompositeElement
{
private const string tagName = "shape";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10713;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "rot","type","blip","zOrderOff","hideGeom","lkTxEntry","blipPhldr" };
private static byte[] attributeNamespaceIds = { 0,0,19,0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Rotation.</para>
/// <para>Represents the following attribute in the schema: rot </para>
/// </summary>
[SchemaAttr(0, "rot")]
public DoubleValue Rotation
{
get { return (DoubleValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Shape Type.</para>
/// <para>Represents the following attribute in the schema: type </para>
/// </summary>
[SchemaAttr(0, "type")]
public StringValue Type
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Relationship to Image Part.</para>
/// <para>Represents the following attribute in the schema: r:blip </para>
/// </summary>
///<remark> xmlns:r=http://schemas.openxmlformats.org/officeDocument/2006/relationships
///</remark>
[SchemaAttr(19, "blip")]
public StringValue Blip
{
get { return (StringValue)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Z-Order Offset.</para>
/// <para>Represents the following attribute in the schema: zOrderOff </para>
/// </summary>
[SchemaAttr(0, "zOrderOff")]
public Int32Value ZOrderOffset
{
get { return (Int32Value)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// <para> Hide Geometry.</para>
/// <para>Represents the following attribute in the schema: hideGeom </para>
/// </summary>
[SchemaAttr(0, "hideGeom")]
public BooleanValue HideGeometry
{
get { return (BooleanValue)Attributes[4]; }
set { Attributes[4] = value; }
}
/// <summary>
/// <para> Prevent Text Editing.</para>
/// <para>Represents the following attribute in the schema: lkTxEntry </para>
/// </summary>
[SchemaAttr(0, "lkTxEntry")]
public BooleanValue LockedText
{
get { return (BooleanValue)Attributes[5]; }
set { Attributes[5] = value; }
}
/// <summary>
/// <para> Image Placeholder.</para>
/// <para>Represents the following attribute in the schema: blipPhldr </para>
/// </summary>
[SchemaAttr(0, "blipPhldr")]
public BooleanValue BlipPlaceholder
{
get { return (BooleanValue)Attributes[6]; }
set { Attributes[6] = value; }
}
/// <summary>
/// Initializes a new instance of the Shape class.
/// </summary>
public Shape():base(){}
/// <summary>
///Initializes a new instance of the Shape class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Shape(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Shape class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Shape(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Shape class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Shape(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "adjLst" == name)
return new AdjustList();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "adjLst","extLst" };
private static readonly byte[] eleNamespaceIds = { 14,14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Shape Adjust List.</para>
/// <para> Represents the following element tag in the schema: dgm:adjLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public AdjustList AdjustList
{
get
{
return GetElement<AdjustList>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> ExtensionList.</para>
/// <para> Represents the following element tag in the schema: dgm:extLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ExtensionList ExtensionList
{
get
{
return GetElement<ExtensionList>(1);
}
set
{
SetElement(1, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "rot" == name)
return new DoubleValue();
if( 0 == namespaceId && "type" == name)
return new StringValue();
if( 19 == namespaceId && "blip" == name)
return new StringValue();
if( 0 == namespaceId && "zOrderOff" == name)
return new Int32Value();
if( 0 == namespaceId && "hideGeom" == name)
return new BooleanValue();
if( 0 == namespaceId && "lkTxEntry" == name)
return new BooleanValue();
if( 0 == namespaceId && "blipPhldr" == name)
return new BooleanValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Shape>(deep);
}
}
/// <summary>
/// <para>Presentation Of.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:presOf.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class PresentationOf : OpenXmlCompositeElement
{
private const string tagName = "presOf";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10714;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "axis","ptType","hideLastTrans","st","cnt","step" };
private static byte[] attributeNamespaceIds = { 0,0,0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Axis.</para>
/// <para>Represents the following attribute in the schema: axis </para>
/// </summary>
[SchemaAttr(0, "axis")]
public ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>> Axis
{
get { return (ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Data Point Type.</para>
/// <para>Represents the following attribute in the schema: ptType </para>
/// </summary>
[SchemaAttr(0, "ptType")]
public ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>> PointType
{
get { return (ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>>)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Hide Last Transition.</para>
/// <para>Represents the following attribute in the schema: hideLastTrans </para>
/// </summary>
[SchemaAttr(0, "hideLastTrans")]
public ListValue<BooleanValue> HideLastTrans
{
get { return (ListValue<BooleanValue>)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Start.</para>
/// <para>Represents the following attribute in the schema: st </para>
/// </summary>
[SchemaAttr(0, "st")]
public ListValue<Int32Value> Start
{
get { return (ListValue<Int32Value>)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// <para> Count.</para>
/// <para>Represents the following attribute in the schema: cnt </para>
/// </summary>
[SchemaAttr(0, "cnt")]
public ListValue<UInt32Value> Count
{
get { return (ListValue<UInt32Value>)Attributes[4]; }
set { Attributes[4] = value; }
}
/// <summary>
/// <para> Step.</para>
/// <para>Represents the following attribute in the schema: step </para>
/// </summary>
[SchemaAttr(0, "step")]
public ListValue<Int32Value> Step
{
get { return (ListValue<Int32Value>)Attributes[5]; }
set { Attributes[5] = value; }
}
/// <summary>
/// Initializes a new instance of the PresentationOf class.
/// </summary>
public PresentationOf():base(){}
/// <summary>
///Initializes a new instance of the PresentationOf class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public PresentationOf(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the PresentationOf class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public PresentationOf(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the PresentationOf class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public PresentationOf(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "extLst" };
private static readonly byte[] eleNamespaceIds = { 14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> ExtensionList.</para>
/// <para> Represents the following element tag in the schema: dgm:extLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ExtensionList ExtensionList
{
get
{
return GetElement<ExtensionList>(0);
}
set
{
SetElement(0, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "axis" == name)
return new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>>();
if( 0 == namespaceId && "ptType" == name)
return new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>>();
if( 0 == namespaceId && "hideLastTrans" == name)
return new ListValue<BooleanValue>();
if( 0 == namespaceId && "st" == name)
return new ListValue<Int32Value>();
if( 0 == namespaceId && "cnt" == name)
return new ListValue<UInt32Value>();
if( 0 == namespaceId && "step" == name)
return new ListValue<Int32Value>();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<PresentationOf>(deep);
}
}
/// <summary>
/// <para>Constraint List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:constrLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Constraint <dgm:constr></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Constraint))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Constraints : OpenXmlCompositeElement
{
private const string tagName = "constrLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10715;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the Constraints class.
/// </summary>
public Constraints():base(){}
/// <summary>
///Initializes a new instance of the Constraints class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Constraints(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Constraints class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Constraints(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Constraints class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Constraints(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "constr" == name)
return new Constraint();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Constraints>(deep);
}
}
/// <summary>
/// <para>Rule List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:ruleLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Rule <dgm:rule></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Rule))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class RuleList : OpenXmlCompositeElement
{
private const string tagName = "ruleLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10716;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the RuleList class.
/// </summary>
public RuleList():base(){}
/// <summary>
///Initializes a new instance of the RuleList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public RuleList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the RuleList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public RuleList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the RuleList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public RuleList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "rule" == name)
return new Rule();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<RuleList>(deep);
}
}
/// <summary>
/// <para>Variable List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:varLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>OrganizationChart <dgm:orgChart></description></item>
///<item><description>MaxNumberOfChildren <dgm:chMax></description></item>
///<item><description>PreferredNumberOfChildren <dgm:chPref></description></item>
///<item><description>BulletEnabled <dgm:bulletEnabled></description></item>
///<item><description>Direction <dgm:dir></description></item>
///<item><description>HierarchyBranch <dgm:hierBranch></description></item>
///<item><description>AnimateOneByOne <dgm:animOne></description></item>
///<item><description>AnimationLevel <dgm:animLvl></description></item>
///<item><description>ResizeHandles <dgm:resizeHandles></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class VariableList : LayoutVariablePropertySetType
{
private const string tagName = "varLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10717;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the VariableList class.
/// </summary>
public VariableList():base(){}
/// <summary>
///Initializes a new instance of the VariableList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public VariableList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the VariableList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public VariableList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the VariableList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public VariableList(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<VariableList>(deep);
}
}
/// <summary>
/// <para>Presentation Layout Variables.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:presLayoutVars.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>OrganizationChart <dgm:orgChart></description></item>
///<item><description>MaxNumberOfChildren <dgm:chMax></description></item>
///<item><description>PreferredNumberOfChildren <dgm:chPref></description></item>
///<item><description>BulletEnabled <dgm:bulletEnabled></description></item>
///<item><description>Direction <dgm:dir></description></item>
///<item><description>HierarchyBranch <dgm:hierBranch></description></item>
///<item><description>AnimateOneByOne <dgm:animOne></description></item>
///<item><description>AnimationLevel <dgm:animLvl></description></item>
///<item><description>ResizeHandles <dgm:resizeHandles></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class PresentationLayoutVariables : LayoutVariablePropertySetType
{
private const string tagName = "presLayoutVars";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10731;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the PresentationLayoutVariables class.
/// </summary>
public PresentationLayoutVariables():base(){}
/// <summary>
///Initializes a new instance of the PresentationLayoutVariables class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public PresentationLayoutVariables(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the PresentationLayoutVariables class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public PresentationLayoutVariables(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the PresentationLayoutVariables class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public PresentationLayoutVariables(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<PresentationLayoutVariables>(deep);
}
}
/// <summary>
/// Defines the LayoutVariablePropertySetType class.
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>OrganizationChart <dgm:orgChart></description></item>
///<item><description>MaxNumberOfChildren <dgm:chMax></description></item>
///<item><description>PreferredNumberOfChildren <dgm:chPref></description></item>
///<item><description>BulletEnabled <dgm:bulletEnabled></description></item>
///<item><description>Direction <dgm:dir></description></item>
///<item><description>HierarchyBranch <dgm:hierBranch></description></item>
///<item><description>AnimateOneByOne <dgm:animOne></description></item>
///<item><description>AnimationLevel <dgm:animLvl></description></item>
///<item><description>ResizeHandles <dgm:resizeHandles></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(OrganizationChart))]
[ChildElementInfo(typeof(MaxNumberOfChildren))]
[ChildElementInfo(typeof(PreferredNumberOfChildren))]
[ChildElementInfo(typeof(BulletEnabled))]
[ChildElementInfo(typeof(Direction))]
[ChildElementInfo(typeof(HierarchyBranch))]
[ChildElementInfo(typeof(AnimateOneByOne))]
[ChildElementInfo(typeof(AnimationLevel))]
[ChildElementInfo(typeof(ResizeHandles))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public abstract partial class LayoutVariablePropertySetType : OpenXmlCompositeElement
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "orgChart" == name)
return new OrganizationChart();
if( 14 == namespaceId && "chMax" == name)
return new MaxNumberOfChildren();
if( 14 == namespaceId && "chPref" == name)
return new PreferredNumberOfChildren();
if( 14 == namespaceId && "bulletEnabled" == name)
return new BulletEnabled();
if( 14 == namespaceId && "dir" == name)
return new Direction();
if( 14 == namespaceId && "hierBranch" == name)
return new HierarchyBranch();
if( 14 == namespaceId && "animOne" == name)
return new AnimateOneByOne();
if( 14 == namespaceId && "animLvl" == name)
return new AnimationLevel();
if( 14 == namespaceId && "resizeHandles" == name)
return new ResizeHandles();
return null;
}
private static readonly string[] eleTagNames = { "orgChart","chMax","chPref","bulletEnabled","dir","hierBranch","animOne","animLvl","resizeHandles" };
private static readonly byte[] eleNamespaceIds = { 14,14,14,14,14,14,14,14,14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Show Organization Chart User Interface.</para>
/// <para> Represents the following element tag in the schema: dgm:orgChart </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public OrganizationChart OrganizationChart
{
get
{
return GetElement<OrganizationChart>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> Maximum Children.</para>
/// <para> Represents the following element tag in the schema: dgm:chMax </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public MaxNumberOfChildren MaxNumberOfChildren
{
get
{
return GetElement<MaxNumberOfChildren>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// <para> Preferred Number of Children.</para>
/// <para> Represents the following element tag in the schema: dgm:chPref </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public PreferredNumberOfChildren PreferredNumberOfChildren
{
get
{
return GetElement<PreferredNumberOfChildren>(2);
}
set
{
SetElement(2, value);
}
}
/// <summary>
/// <para> Show Insert Bullet.</para>
/// <para> Represents the following element tag in the schema: dgm:bulletEnabled </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public BulletEnabled BulletEnabled
{
get
{
return GetElement<BulletEnabled>(3);
}
set
{
SetElement(3, value);
}
}
/// <summary>
/// <para> Diagram Direction.</para>
/// <para> Represents the following element tag in the schema: dgm:dir </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public Direction Direction
{
get
{
return GetElement<Direction>(4);
}
set
{
SetElement(4, value);
}
}
/// <summary>
/// <para> Organization Chart Branch Style.</para>
/// <para> Represents the following element tag in the schema: dgm:hierBranch </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public HierarchyBranch HierarchyBranch
{
get
{
return GetElement<HierarchyBranch>(5);
}
set
{
SetElement(5, value);
}
}
/// <summary>
/// <para> One by One Animation String.</para>
/// <para> Represents the following element tag in the schema: dgm:animOne </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public AnimateOneByOne AnimateOneByOne
{
get
{
return GetElement<AnimateOneByOne>(6);
}
set
{
SetElement(6, value);
}
}
/// <summary>
/// <para> Level Animation.</para>
/// <para> Represents the following element tag in the schema: dgm:animLvl </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public AnimationLevel AnimationLevel
{
get
{
return GetElement<AnimationLevel>(7);
}
set
{
SetElement(7, value);
}
}
/// <summary>
/// <para> Shape Resize Style.</para>
/// <para> Represents the following element tag in the schema: dgm:resizeHandles </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ResizeHandles ResizeHandles
{
get
{
return GetElement<ResizeHandles>(8);
}
set
{
SetElement(8, value);
}
}
/// <summary>
/// Initializes a new instance of the LayoutVariablePropertySetType class.
/// </summary>
protected LayoutVariablePropertySetType(){}
/// <summary>
///Initializes a new instance of the LayoutVariablePropertySetType class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
protected LayoutVariablePropertySetType(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LayoutVariablePropertySetType class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
protected LayoutVariablePropertySetType(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LayoutVariablePropertySetType class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
protected LayoutVariablePropertySetType(string outerXml)
: base(outerXml)
{
}
}
/// <summary>
/// <para>For Each.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:forEach.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Algorithm <dgm:alg></description></item>
///<item><description>Shape <dgm:shape></description></item>
///<item><description>PresentationOf <dgm:presOf></description></item>
///<item><description>Constraints <dgm:constrLst></description></item>
///<item><description>RuleList <dgm:ruleLst></description></item>
///<item><description>ForEach <dgm:forEach></description></item>
///<item><description>LayoutNode <dgm:layoutNode></description></item>
///<item><description>Choose <dgm:choose></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Algorithm))]
[ChildElementInfo(typeof(Shape))]
[ChildElementInfo(typeof(PresentationOf))]
[ChildElementInfo(typeof(Constraints))]
[ChildElementInfo(typeof(RuleList))]
[ChildElementInfo(typeof(ForEach))]
[ChildElementInfo(typeof(LayoutNode))]
[ChildElementInfo(typeof(Choose))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ForEach : OpenXmlCompositeElement
{
private const string tagName = "forEach";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10718;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "name","ref","axis","ptType","hideLastTrans","st","cnt","step" };
private static byte[] attributeNamespaceIds = { 0,0,0,0,0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Name.</para>
/// <para>Represents the following attribute in the schema: name </para>
/// </summary>
[SchemaAttr(0, "name")]
public StringValue Name
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Reference.</para>
/// <para>Represents the following attribute in the schema: ref </para>
/// </summary>
[SchemaAttr(0, "ref")]
public StringValue Reference
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Axis.</para>
/// <para>Represents the following attribute in the schema: axis </para>
/// </summary>
[SchemaAttr(0, "axis")]
public ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>> Axis
{
get { return (ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>>)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Data Point Type.</para>
/// <para>Represents the following attribute in the schema: ptType </para>
/// </summary>
[SchemaAttr(0, "ptType")]
public ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>> PointType
{
get { return (ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>>)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// <para> Hide Last Transition.</para>
/// <para>Represents the following attribute in the schema: hideLastTrans </para>
/// </summary>
[SchemaAttr(0, "hideLastTrans")]
public ListValue<BooleanValue> HideLastTrans
{
get { return (ListValue<BooleanValue>)Attributes[4]; }
set { Attributes[4] = value; }
}
/// <summary>
/// <para> Start.</para>
/// <para>Represents the following attribute in the schema: st </para>
/// </summary>
[SchemaAttr(0, "st")]
public ListValue<Int32Value> Start
{
get { return (ListValue<Int32Value>)Attributes[5]; }
set { Attributes[5] = value; }
}
/// <summary>
/// <para> Count.</para>
/// <para>Represents the following attribute in the schema: cnt </para>
/// </summary>
[SchemaAttr(0, "cnt")]
public ListValue<UInt32Value> Count
{
get { return (ListValue<UInt32Value>)Attributes[6]; }
set { Attributes[6] = value; }
}
/// <summary>
/// <para> Step.</para>
/// <para>Represents the following attribute in the schema: step </para>
/// </summary>
[SchemaAttr(0, "step")]
public ListValue<Int32Value> Step
{
get { return (ListValue<Int32Value>)Attributes[7]; }
set { Attributes[7] = value; }
}
/// <summary>
/// Initializes a new instance of the ForEach class.
/// </summary>
public ForEach():base(){}
/// <summary>
///Initializes a new instance of the ForEach class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ForEach(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ForEach class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ForEach(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ForEach class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public ForEach(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "alg" == name)
return new Algorithm();
if( 14 == namespaceId && "shape" == name)
return new Shape();
if( 14 == namespaceId && "presOf" == name)
return new PresentationOf();
if( 14 == namespaceId && "constrLst" == name)
return new Constraints();
if( 14 == namespaceId && "ruleLst" == name)
return new RuleList();
if( 14 == namespaceId && "forEach" == name)
return new ForEach();
if( 14 == namespaceId && "layoutNode" == name)
return new LayoutNode();
if( 14 == namespaceId && "choose" == name)
return new Choose();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "name" == name)
return new StringValue();
if( 0 == namespaceId && "ref" == name)
return new StringValue();
if( 0 == namespaceId && "axis" == name)
return new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>>();
if( 0 == namespaceId && "ptType" == name)
return new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>>();
if( 0 == namespaceId && "hideLastTrans" == name)
return new ListValue<BooleanValue>();
if( 0 == namespaceId && "st" == name)
return new ListValue<Int32Value>();
if( 0 == namespaceId && "cnt" == name)
return new ListValue<UInt32Value>();
if( 0 == namespaceId && "step" == name)
return new ListValue<Int32Value>();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ForEach>(deep);
}
}
/// <summary>
/// <para>Layout Node.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:layoutNode.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Algorithm <dgm:alg></description></item>
///<item><description>Shape <dgm:shape></description></item>
///<item><description>PresentationOf <dgm:presOf></description></item>
///<item><description>Constraints <dgm:constrLst></description></item>
///<item><description>RuleList <dgm:ruleLst></description></item>
///<item><description>VariableList <dgm:varLst></description></item>
///<item><description>ForEach <dgm:forEach></description></item>
///<item><description>LayoutNode <dgm:layoutNode></description></item>
///<item><description>Choose <dgm:choose></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Algorithm))]
[ChildElementInfo(typeof(Shape))]
[ChildElementInfo(typeof(PresentationOf))]
[ChildElementInfo(typeof(Constraints))]
[ChildElementInfo(typeof(RuleList))]
[ChildElementInfo(typeof(VariableList))]
[ChildElementInfo(typeof(ForEach))]
[ChildElementInfo(typeof(LayoutNode))]
[ChildElementInfo(typeof(Choose))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class LayoutNode : OpenXmlCompositeElement
{
private const string tagName = "layoutNode";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10719;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "name","styleLbl","chOrder","moveWith" };
private static byte[] attributeNamespaceIds = { 0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Name.</para>
/// <para>Represents the following attribute in the schema: name </para>
/// </summary>
[SchemaAttr(0, "name")]
public StringValue Name
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Style Label.</para>
/// <para>Represents the following attribute in the schema: styleLbl </para>
/// </summary>
[SchemaAttr(0, "styleLbl")]
public StringValue StyleLabel
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Child Order.</para>
/// <para>Represents the following attribute in the schema: chOrder </para>
/// </summary>
[SchemaAttr(0, "chOrder")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ChildOrderValues> ChildOrder
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ChildOrderValues>)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Move With.</para>
/// <para>Represents the following attribute in the schema: moveWith </para>
/// </summary>
[SchemaAttr(0, "moveWith")]
public StringValue MoveWith
{
get { return (StringValue)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// Initializes a new instance of the LayoutNode class.
/// </summary>
public LayoutNode():base(){}
/// <summary>
///Initializes a new instance of the LayoutNode class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public LayoutNode(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LayoutNode class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public LayoutNode(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the LayoutNode class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public LayoutNode(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "alg" == name)
return new Algorithm();
if( 14 == namespaceId && "shape" == name)
return new Shape();
if( 14 == namespaceId && "presOf" == name)
return new PresentationOf();
if( 14 == namespaceId && "constrLst" == name)
return new Constraints();
if( 14 == namespaceId && "ruleLst" == name)
return new RuleList();
if( 14 == namespaceId && "varLst" == name)
return new VariableList();
if( 14 == namespaceId && "forEach" == name)
return new ForEach();
if( 14 == namespaceId && "layoutNode" == name)
return new LayoutNode();
if( 14 == namespaceId && "choose" == name)
return new Choose();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "name" == name)
return new StringValue();
if( 0 == namespaceId && "styleLbl" == name)
return new StringValue();
if( 0 == namespaceId && "chOrder" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ChildOrderValues>();
if( 0 == namespaceId && "moveWith" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<LayoutNode>(deep);
}
}
/// <summary>
/// <para>Choose Element.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:choose.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DiagramChooseIf <dgm:if></description></item>
///<item><description>DiagramChooseElse <dgm:else></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DiagramChooseIf))]
[ChildElementInfo(typeof(DiagramChooseElse))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Choose : OpenXmlCompositeElement
{
private const string tagName = "choose";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10720;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "name" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Name.</para>
/// <para>Represents the following attribute in the schema: name </para>
/// </summary>
[SchemaAttr(0, "name")]
public StringValue Name
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the Choose class.
/// </summary>
public Choose():base(){}
/// <summary>
///Initializes a new instance of the Choose class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Choose(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Choose class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Choose(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Choose class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Choose(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "if" == name)
return new DiagramChooseIf();
if( 14 == namespaceId && "else" == name)
return new DiagramChooseElse();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "name" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Choose>(deep);
}
}
/// <summary>
/// <para>If.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:if.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Algorithm <dgm:alg></description></item>
///<item><description>Shape <dgm:shape></description></item>
///<item><description>PresentationOf <dgm:presOf></description></item>
///<item><description>Constraints <dgm:constrLst></description></item>
///<item><description>RuleList <dgm:ruleLst></description></item>
///<item><description>ForEach <dgm:forEach></description></item>
///<item><description>LayoutNode <dgm:layoutNode></description></item>
///<item><description>Choose <dgm:choose></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Algorithm))]
[ChildElementInfo(typeof(Shape))]
[ChildElementInfo(typeof(PresentationOf))]
[ChildElementInfo(typeof(Constraints))]
[ChildElementInfo(typeof(RuleList))]
[ChildElementInfo(typeof(ForEach))]
[ChildElementInfo(typeof(LayoutNode))]
[ChildElementInfo(typeof(Choose))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class DiagramChooseIf : OpenXmlCompositeElement
{
private const string tagName = "if";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10721;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "name","axis","ptType","hideLastTrans","st","cnt","step","func","arg","op","val" };
private static byte[] attributeNamespaceIds = { 0,0,0,0,0,0,0,0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Name.</para>
/// <para>Represents the following attribute in the schema: name </para>
/// </summary>
[SchemaAttr(0, "name")]
public StringValue Name
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Axis.</para>
/// <para>Represents the following attribute in the schema: axis </para>
/// </summary>
[SchemaAttr(0, "axis")]
public ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>> Axis
{
get { return (ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>>)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Data Point Type.</para>
/// <para>Represents the following attribute in the schema: ptType </para>
/// </summary>
[SchemaAttr(0, "ptType")]
public ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>> PointType
{
get { return (ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>>)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Hide Last Transition.</para>
/// <para>Represents the following attribute in the schema: hideLastTrans </para>
/// </summary>
[SchemaAttr(0, "hideLastTrans")]
public ListValue<BooleanValue> HideLastTrans
{
get { return (ListValue<BooleanValue>)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// <para> Start.</para>
/// <para>Represents the following attribute in the schema: st </para>
/// </summary>
[SchemaAttr(0, "st")]
public ListValue<Int32Value> Start
{
get { return (ListValue<Int32Value>)Attributes[4]; }
set { Attributes[4] = value; }
}
/// <summary>
/// <para> Count.</para>
/// <para>Represents the following attribute in the schema: cnt </para>
/// </summary>
[SchemaAttr(0, "cnt")]
public ListValue<UInt32Value> Count
{
get { return (ListValue<UInt32Value>)Attributes[5]; }
set { Attributes[5] = value; }
}
/// <summary>
/// <para> Step.</para>
/// <para>Represents the following attribute in the schema: step </para>
/// </summary>
[SchemaAttr(0, "step")]
public ListValue<Int32Value> Step
{
get { return (ListValue<Int32Value>)Attributes[6]; }
set { Attributes[6] = value; }
}
/// <summary>
/// <para> Function.</para>
/// <para>Represents the following attribute in the schema: func </para>
/// </summary>
[SchemaAttr(0, "func")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.FunctionValues> Function
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.FunctionValues>)Attributes[7]; }
set { Attributes[7] = value; }
}
/// <summary>
/// <para> Argument.</para>
/// <para>Represents the following attribute in the schema: arg </para>
/// </summary>
[SchemaAttr(0, "arg")]
public StringValue Argument
{
get { return (StringValue)Attributes[8]; }
set { Attributes[8] = value; }
}
/// <summary>
/// <para> Operator.</para>
/// <para>Represents the following attribute in the schema: op </para>
/// </summary>
[SchemaAttr(0, "op")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.FunctionOperatorValues> Operator
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.FunctionOperatorValues>)Attributes[9]; }
set { Attributes[9] = value; }
}
/// <summary>
/// <para> Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public StringValue Val
{
get { return (StringValue)Attributes[10]; }
set { Attributes[10] = value; }
}
/// <summary>
/// Initializes a new instance of the DiagramChooseIf class.
/// </summary>
public DiagramChooseIf():base(){}
/// <summary>
///Initializes a new instance of the DiagramChooseIf class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public DiagramChooseIf(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the DiagramChooseIf class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public DiagramChooseIf(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the DiagramChooseIf class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public DiagramChooseIf(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "alg" == name)
return new Algorithm();
if( 14 == namespaceId && "shape" == name)
return new Shape();
if( 14 == namespaceId && "presOf" == name)
return new PresentationOf();
if( 14 == namespaceId && "constrLst" == name)
return new Constraints();
if( 14 == namespaceId && "ruleLst" == name)
return new RuleList();
if( 14 == namespaceId && "forEach" == name)
return new ForEach();
if( 14 == namespaceId && "layoutNode" == name)
return new LayoutNode();
if( 14 == namespaceId && "choose" == name)
return new Choose();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "name" == name)
return new StringValue();
if( 0 == namespaceId && "axis" == name)
return new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>>();
if( 0 == namespaceId && "ptType" == name)
return new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>>();
if( 0 == namespaceId && "hideLastTrans" == name)
return new ListValue<BooleanValue>();
if( 0 == namespaceId && "st" == name)
return new ListValue<Int32Value>();
if( 0 == namespaceId && "cnt" == name)
return new ListValue<UInt32Value>();
if( 0 == namespaceId && "step" == name)
return new ListValue<Int32Value>();
if( 0 == namespaceId && "func" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.FunctionValues>();
if( 0 == namespaceId && "arg" == name)
return new StringValue();
if( 0 == namespaceId && "op" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.FunctionOperatorValues>();
if( 0 == namespaceId && "val" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<DiagramChooseIf>(deep);
}
}
/// <summary>
/// <para>Else.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:else.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Algorithm <dgm:alg></description></item>
///<item><description>Shape <dgm:shape></description></item>
///<item><description>PresentationOf <dgm:presOf></description></item>
///<item><description>Constraints <dgm:constrLst></description></item>
///<item><description>RuleList <dgm:ruleLst></description></item>
///<item><description>ForEach <dgm:forEach></description></item>
///<item><description>LayoutNode <dgm:layoutNode></description></item>
///<item><description>Choose <dgm:choose></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Algorithm))]
[ChildElementInfo(typeof(Shape))]
[ChildElementInfo(typeof(PresentationOf))]
[ChildElementInfo(typeof(Constraints))]
[ChildElementInfo(typeof(RuleList))]
[ChildElementInfo(typeof(ForEach))]
[ChildElementInfo(typeof(LayoutNode))]
[ChildElementInfo(typeof(Choose))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class DiagramChooseElse : OpenXmlCompositeElement
{
private const string tagName = "else";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10722;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "name" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Name.</para>
/// <para>Represents the following attribute in the schema: name </para>
/// </summary>
[SchemaAttr(0, "name")]
public StringValue Name
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the DiagramChooseElse class.
/// </summary>
public DiagramChooseElse():base(){}
/// <summary>
///Initializes a new instance of the DiagramChooseElse class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public DiagramChooseElse(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the DiagramChooseElse class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public DiagramChooseElse(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the DiagramChooseElse class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public DiagramChooseElse(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "alg" == name)
return new Algorithm();
if( 14 == namespaceId && "shape" == name)
return new Shape();
if( 14 == namespaceId && "presOf" == name)
return new PresentationOf();
if( 14 == namespaceId && "constrLst" == name)
return new Constraints();
if( 14 == namespaceId && "ruleLst" == name)
return new RuleList();
if( 14 == namespaceId && "forEach" == name)
return new ForEach();
if( 14 == namespaceId && "layoutNode" == name)
return new LayoutNode();
if( 14 == namespaceId && "choose" == name)
return new Choose();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "name" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<DiagramChooseElse>(deep);
}
}
/// <summary>
/// <para>Data Model.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:dataModel.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>PointList <dgm:ptLst></description></item>
///<item><description>ConnectionList <dgm:cxnLst></description></item>
///<item><description>Background <dgm:bg></description></item>
///<item><description>Whole <dgm:whole></description></item>
///<item><description>DataModelExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(PointList))]
[ChildElementInfo(typeof(ConnectionList))]
[ChildElementInfo(typeof(Background))]
[ChildElementInfo(typeof(Whole))]
[ChildElementInfo(typeof(DataModelExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class DataModel : OpenXmlCompositeElement
{
private const string tagName = "dataModel";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10723;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the DataModel class.
/// </summary>
public DataModel():base(){}
/// <summary>
///Initializes a new instance of the DataModel class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public DataModel(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the DataModel class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public DataModel(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the DataModel class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public DataModel(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "ptLst" == name)
return new PointList();
if( 14 == namespaceId && "cxnLst" == name)
return new ConnectionList();
if( 14 == namespaceId && "bg" == name)
return new Background();
if( 14 == namespaceId && "whole" == name)
return new Whole();
if( 14 == namespaceId && "extLst" == name)
return new DataModelExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "ptLst","cxnLst","bg","whole","extLst" };
private static readonly byte[] eleNamespaceIds = { 14,14,14,14,14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Point List.</para>
/// <para> Represents the following element tag in the schema: dgm:ptLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public PointList PointList
{
get
{
return GetElement<PointList>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> Connection List.</para>
/// <para> Represents the following element tag in the schema: dgm:cxnLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ConnectionList ConnectionList
{
get
{
return GetElement<ConnectionList>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// <para> Background Formatting.</para>
/// <para> Represents the following element tag in the schema: dgm:bg </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public Background Background
{
get
{
return GetElement<Background>(2);
}
set
{
SetElement(2, value);
}
}
/// <summary>
/// <para> Whole E2O Formatting.</para>
/// <para> Represents the following element tag in the schema: dgm:whole </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public Whole Whole
{
get
{
return GetElement<Whole>(3);
}
set
{
SetElement(3, value);
}
}
/// <summary>
/// <para> DataModelExtensionList.</para>
/// <para> Represents the following element tag in the schema: dgm:extLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public DataModelExtensionList DataModelExtensionList
{
get
{
return GetElement<DataModelExtensionList>(4);
}
set
{
SetElement(4, value);
}
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<DataModel>(deep);
}
}
/// <summary>
/// <para>Category.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:cat.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Category : OpenXmlLeafElement
{
private const string tagName = "cat";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10724;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "type","pri" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Category Type.</para>
/// <para>Represents the following attribute in the schema: type </para>
/// </summary>
[SchemaAttr(0, "type")]
public StringValue Type
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Priority.</para>
/// <para>Represents the following attribute in the schema: pri </para>
/// </summary>
[SchemaAttr(0, "pri")]
public UInt32Value Priority
{
get { return (UInt32Value)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the Category class.
/// </summary>
public Category():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "type" == name)
return new StringValue();
if( 0 == namespaceId && "pri" == name)
return new UInt32Value();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Category>(deep);
}
}
/// <summary>
/// <para>Title.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:title.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Title : OpenXmlLeafElement
{
private const string tagName = "title";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10725;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "lang","val" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Language.</para>
/// <para>Represents the following attribute in the schema: lang </para>
/// </summary>
[SchemaAttr(0, "lang")]
public StringValue Language
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public StringValue Val
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the Title class.
/// </summary>
public Title():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "lang" == name)
return new StringValue();
if( 0 == namespaceId && "val" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Title>(deep);
}
}
/// <summary>
/// <para>Description.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:desc.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Description : OpenXmlLeafElement
{
private const string tagName = "desc";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10726;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "lang","val" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Language.</para>
/// <para>Represents the following attribute in the schema: lang </para>
/// </summary>
[SchemaAttr(0, "lang")]
public StringValue Language
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public StringValue Val
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the Description class.
/// </summary>
public Description():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "lang" == name)
return new StringValue();
if( 0 == namespaceId && "val" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Description>(deep);
}
}
/// <summary>
/// <para>Category List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:catLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Category <dgm:cat></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Category))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class CategoryList : OpenXmlCompositeElement
{
private const string tagName = "catLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10727;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the CategoryList class.
/// </summary>
public CategoryList():base(){}
/// <summary>
///Initializes a new instance of the CategoryList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public CategoryList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the CategoryList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public CategoryList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the CategoryList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public CategoryList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "cat" == name)
return new Category();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<CategoryList>(deep);
}
}
/// <summary>
/// <para>Sample Data.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:sampData.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DataModel <dgm:dataModel></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class SampleData : SampleDataType
{
private const string tagName = "sampData";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10728;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the SampleData class.
/// </summary>
public SampleData():base(){}
/// <summary>
///Initializes a new instance of the SampleData class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public SampleData(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the SampleData class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public SampleData(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the SampleData class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public SampleData(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<SampleData>(deep);
}
}
/// <summary>
/// <para>Style Data.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:styleData.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DataModel <dgm:dataModel></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class StyleData : SampleDataType
{
private const string tagName = "styleData";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10729;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the StyleData class.
/// </summary>
public StyleData():base(){}
/// <summary>
///Initializes a new instance of the StyleData class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleData(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleData class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleData(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleData class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public StyleData(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<StyleData>(deep);
}
}
/// <summary>
/// <para>Color Transform Sample Data.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:clrData.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DataModel <dgm:dataModel></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ColorData : SampleDataType
{
private const string tagName = "clrData";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10730;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the ColorData class.
/// </summary>
public ColorData():base(){}
/// <summary>
///Initializes a new instance of the ColorData class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorData(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorData class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ColorData(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ColorData class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public ColorData(string outerXml)
: base(outerXml)
{
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ColorData>(deep);
}
}
/// <summary>
/// Defines the SampleDataType class.
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DataModel <dgm:dataModel></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DataModel))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public abstract partial class SampleDataType : OpenXmlCompositeElement
{
private static string[] attributeTagNames = { "useDef" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Use Default.</para>
/// <para>Represents the following attribute in the schema: useDef </para>
/// </summary>
[SchemaAttr(0, "useDef")]
public BooleanValue UseDefault
{
get { return (BooleanValue)Attributes[0]; }
set { Attributes[0] = value; }
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "dataModel" == name)
return new DataModel();
return null;
}
private static readonly string[] eleTagNames = { "dataModel" };
private static readonly byte[] eleNamespaceIds = { 14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Data Model.</para>
/// <para> Represents the following element tag in the schema: dgm:dataModel </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public DataModel DataModel
{
get
{
return GetElement<DataModel>(0);
}
set
{
SetElement(0, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "useDef" == name)
return new BooleanValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Initializes a new instance of the SampleDataType class.
/// </summary>
protected SampleDataType(){}
/// <summary>
///Initializes a new instance of the SampleDataType class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
protected SampleDataType(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the SampleDataType class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
protected SampleDataType(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the SampleDataType class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
protected SampleDataType(string outerXml)
: base(outerXml)
{
}
}
/// <summary>
/// <para>Shape Style.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:style.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.LineReference <a:lnRef></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.FillReference <a:fillRef></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.EffectReference <a:effectRef></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.FontReference <a:fontRef></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.LineReference))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.FillReference))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.EffectReference))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.FontReference))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Style : OpenXmlCompositeElement
{
private const string tagName = "style";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10732;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the Style class.
/// </summary>
public Style():base(){}
/// <summary>
///Initializes a new instance of the Style class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Style(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Style class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Style(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Style class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Style(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "lnRef" == name)
return new DocumentFormat.OpenXml.Drawing.LineReference();
if( 10 == namespaceId && "fillRef" == name)
return new DocumentFormat.OpenXml.Drawing.FillReference();
if( 10 == namespaceId && "effectRef" == name)
return new DocumentFormat.OpenXml.Drawing.EffectReference();
if( 10 == namespaceId && "fontRef" == name)
return new DocumentFormat.OpenXml.Drawing.FontReference();
return null;
}
private static readonly string[] eleTagNames = { "lnRef","fillRef","effectRef","fontRef" };
private static readonly byte[] eleNamespaceIds = { 10,10,10,10 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> LineReference.</para>
/// <para> Represents the following element tag in the schema: a:lnRef </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.LineReference LineReference
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.LineReference>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> FillReference.</para>
/// <para> Represents the following element tag in the schema: a:fillRef </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.FillReference FillReference
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.FillReference>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// <para> EffectReference.</para>
/// <para> Represents the following element tag in the schema: a:effectRef </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.EffectReference EffectReference
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.EffectReference>(2);
}
set
{
SetElement(2, value);
}
}
/// <summary>
/// <para> Font Reference.</para>
/// <para> Represents the following element tag in the schema: a:fontRef </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.FontReference FontReference
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.FontReference>(3);
}
set
{
SetElement(3, value);
}
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Style>(deep);
}
}
/// <summary>
/// <para>Show Organization Chart User Interface.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:orgChart.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class OrganizationChart : OpenXmlLeafElement
{
private const string tagName = "orgChart";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10733;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "val" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Show Organization Chart User Interface Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public BooleanValue Val
{
get { return (BooleanValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the OrganizationChart class.
/// </summary>
public OrganizationChart():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "val" == name)
return new BooleanValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<OrganizationChart>(deep);
}
}
/// <summary>
/// <para>Maximum Children.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:chMax.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class MaxNumberOfChildren : OpenXmlLeafElement
{
private const string tagName = "chMax";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10734;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "val" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Maximum Children Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public Int32Value Val
{
get { return (Int32Value)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the MaxNumberOfChildren class.
/// </summary>
public MaxNumberOfChildren():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "val" == name)
return new Int32Value();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<MaxNumberOfChildren>(deep);
}
}
/// <summary>
/// <para>Preferred Number of Children.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:chPref.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class PreferredNumberOfChildren : OpenXmlLeafElement
{
private const string tagName = "chPref";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10735;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "val" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Preferred Number of CHildren Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public Int32Value Val
{
get { return (Int32Value)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the PreferredNumberOfChildren class.
/// </summary>
public PreferredNumberOfChildren():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "val" == name)
return new Int32Value();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<PreferredNumberOfChildren>(deep);
}
}
/// <summary>
/// <para>Show Insert Bullet.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:bulletEnabled.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class BulletEnabled : OpenXmlLeafElement
{
private const string tagName = "bulletEnabled";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10736;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "val" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Show Insert Bullet Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public BooleanValue Val
{
get { return (BooleanValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the BulletEnabled class.
/// </summary>
public BulletEnabled():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "val" == name)
return new BooleanValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<BulletEnabled>(deep);
}
}
/// <summary>
/// <para>Diagram Direction.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:dir.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Direction : OpenXmlLeafElement
{
private const string tagName = "dir";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10737;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "val" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Diagram Direction Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.DirectionValues> Val
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.DirectionValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the Direction class.
/// </summary>
public Direction():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "val" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.DirectionValues>();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Direction>(deep);
}
}
/// <summary>
/// <para>Organization Chart Branch Style.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:hierBranch.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class HierarchyBranch : OpenXmlLeafElement
{
private const string tagName = "hierBranch";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10738;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "val" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Organization Chart Branch Style Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.HierarchyBranchStyleValues> Val
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.HierarchyBranchStyleValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the HierarchyBranch class.
/// </summary>
public HierarchyBranch():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "val" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.HierarchyBranchStyleValues>();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<HierarchyBranch>(deep);
}
}
/// <summary>
/// <para>One by One Animation String.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:animOne.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class AnimateOneByOne : OpenXmlLeafElement
{
private const string tagName = "animOne";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10739;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "val" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> One By One Animation Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AnimateOneByOneValues> Val
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AnimateOneByOneValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the AnimateOneByOne class.
/// </summary>
public AnimateOneByOne():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "val" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AnimateOneByOneValues>();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<AnimateOneByOne>(deep);
}
}
/// <summary>
/// <para>Level Animation.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:animLvl.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class AnimationLevel : OpenXmlLeafElement
{
private const string tagName = "animLvl";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10740;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "val" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Level Animation Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AnimationLevelStringValues> Val
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AnimationLevelStringValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the AnimationLevel class.
/// </summary>
public AnimationLevel():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "val" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AnimationLevelStringValues>();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<AnimationLevel>(deep);
}
}
/// <summary>
/// <para>Shape Resize Style.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:resizeHandles.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ResizeHandles : OpenXmlLeafElement
{
private const string tagName = "resizeHandles";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10741;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "val" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Shape Resize Style Type.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ResizeHandlesStringValues> Val
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ResizeHandlesStringValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the ResizeHandles class.
/// </summary>
public ResizeHandles():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "val" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ResizeHandlesStringValues>();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ResizeHandles>(deep);
}
}
/// <summary>
/// <para>Category.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:cat.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class StyleDisplayCategory : OpenXmlLeafElement
{
private const string tagName = "cat";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10742;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "type","pri" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Category Type.</para>
/// <para>Represents the following attribute in the schema: type </para>
/// </summary>
[SchemaAttr(0, "type")]
public StringValue Type
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Priority.</para>
/// <para>Represents the following attribute in the schema: pri </para>
/// </summary>
[SchemaAttr(0, "pri")]
public UInt32Value Priority
{
get { return (UInt32Value)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the StyleDisplayCategory class.
/// </summary>
public StyleDisplayCategory():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "type" == name)
return new StringValue();
if( 0 == namespaceId && "pri" == name)
return new UInt32Value();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<StyleDisplayCategory>(deep);
}
}
/// <summary>
/// <para>3-D Scene.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:scene3d.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.Camera <a:camera></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.LightRig <a:lightRig></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.Backdrop <a:backdrop></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.ExtensionList <a:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.Camera))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.LightRig))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.Backdrop))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Scene3D : OpenXmlCompositeElement
{
private const string tagName = "scene3d";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10743;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the Scene3D class.
/// </summary>
public Scene3D():base(){}
/// <summary>
///Initializes a new instance of the Scene3D class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Scene3D(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Scene3D class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Scene3D(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Scene3D class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Scene3D(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "camera" == name)
return new DocumentFormat.OpenXml.Drawing.Camera();
if( 10 == namespaceId && "lightRig" == name)
return new DocumentFormat.OpenXml.Drawing.LightRig();
if( 10 == namespaceId && "backdrop" == name)
return new DocumentFormat.OpenXml.Drawing.Backdrop();
if( 10 == namespaceId && "extLst" == name)
return new DocumentFormat.OpenXml.Drawing.ExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "camera","lightRig","backdrop","extLst" };
private static readonly byte[] eleNamespaceIds = { 10,10,10,10 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Camera.</para>
/// <para> Represents the following element tag in the schema: a:camera </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.Camera Camera
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.Camera>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> Light Rig.</para>
/// <para> Represents the following element tag in the schema: a:lightRig </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.LightRig LightRig
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.LightRig>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// <para> Backdrop Plane.</para>
/// <para> Represents the following element tag in the schema: a:backdrop </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.Backdrop Backdrop
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.Backdrop>(2);
}
set
{
SetElement(2, value);
}
}
/// <summary>
/// <para> ExtensionList.</para>
/// <para> Represents the following element tag in the schema: a:extLst </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.ExtensionList ExtensionList
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.ExtensionList>(3);
}
set
{
SetElement(3, value);
}
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Scene3D>(deep);
}
}
/// <summary>
/// <para>3-D Shape Properties.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:sp3d.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.BevelTop <a:bevelT></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.BevelBottom <a:bevelB></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.ExtrusionColor <a:extrusionClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.ContourColor <a:contourClr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.ExtensionList <a:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.BevelTop))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.BevelBottom))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.ExtrusionColor))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.ContourColor))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Shape3D : OpenXmlCompositeElement
{
private const string tagName = "sp3d";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10744;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "z","extrusionH","contourW","prstMaterial" };
private static byte[] attributeNamespaceIds = { 0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Shape Depth.</para>
/// <para>Represents the following attribute in the schema: z </para>
/// </summary>
[SchemaAttr(0, "z")]
public Int64Value Z
{
get { return (Int64Value)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Extrusion Height.</para>
/// <para>Represents the following attribute in the schema: extrusionH </para>
/// </summary>
[SchemaAttr(0, "extrusionH")]
public Int64Value ExtrusionHeight
{
get { return (Int64Value)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Contour Width.</para>
/// <para>Represents the following attribute in the schema: contourW </para>
/// </summary>
[SchemaAttr(0, "contourW")]
public Int64Value ContourWidth
{
get { return (Int64Value)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Preset Material Type.</para>
/// <para>Represents the following attribute in the schema: prstMaterial </para>
/// </summary>
[SchemaAttr(0, "prstMaterial")]
public EnumValue<DocumentFormat.OpenXml.Drawing.PresetMaterialTypeValues> PresetMaterial
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.PresetMaterialTypeValues>)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// Initializes a new instance of the Shape3D class.
/// </summary>
public Shape3D():base(){}
/// <summary>
///Initializes a new instance of the Shape3D class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Shape3D(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Shape3D class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Shape3D(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Shape3D class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Shape3D(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "bevelT" == name)
return new DocumentFormat.OpenXml.Drawing.BevelTop();
if( 10 == namespaceId && "bevelB" == name)
return new DocumentFormat.OpenXml.Drawing.BevelBottom();
if( 10 == namespaceId && "extrusionClr" == name)
return new DocumentFormat.OpenXml.Drawing.ExtrusionColor();
if( 10 == namespaceId && "contourClr" == name)
return new DocumentFormat.OpenXml.Drawing.ContourColor();
if( 10 == namespaceId && "extLst" == name)
return new DocumentFormat.OpenXml.Drawing.ExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "bevelT","bevelB","extrusionClr","contourClr","extLst" };
private static readonly byte[] eleNamespaceIds = { 10,10,10,10,10 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Top Bevel.</para>
/// <para> Represents the following element tag in the schema: a:bevelT </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.BevelTop BevelTop
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.BevelTop>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> Bottom Bevel.</para>
/// <para> Represents the following element tag in the schema: a:bevelB </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.BevelBottom BevelBottom
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.BevelBottom>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// <para> Extrusion Color.</para>
/// <para> Represents the following element tag in the schema: a:extrusionClr </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.ExtrusionColor ExtrusionColor
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.ExtrusionColor>(2);
}
set
{
SetElement(2, value);
}
}
/// <summary>
/// <para> Contour Color.</para>
/// <para> Represents the following element tag in the schema: a:contourClr </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.ContourColor ContourColor
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.ContourColor>(3);
}
set
{
SetElement(3, value);
}
}
/// <summary>
/// <para> ExtensionList.</para>
/// <para> Represents the following element tag in the schema: a:extLst </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.ExtensionList ExtensionList
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.ExtensionList>(4);
}
set
{
SetElement(4, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "z" == name)
return new Int64Value();
if( 0 == namespaceId && "extrusionH" == name)
return new Int64Value();
if( 0 == namespaceId && "contourW" == name)
return new Int64Value();
if( 0 == namespaceId && "prstMaterial" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.PresetMaterialTypeValues>();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Shape3D>(deep);
}
}
/// <summary>
/// <para>Text Properties.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:txPr.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.Shape3DType <a:sp3d></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.FlatText <a:flatTx></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.Shape3DType))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.FlatText))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class TextProperties : OpenXmlCompositeElement
{
private const string tagName = "txPr";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10745;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the TextProperties class.
/// </summary>
public TextProperties():base(){}
/// <summary>
///Initializes a new instance of the TextProperties class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public TextProperties(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the TextProperties class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public TextProperties(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the TextProperties class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public TextProperties(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "sp3d" == name)
return new DocumentFormat.OpenXml.Drawing.Shape3DType();
if( 10 == namespaceId && "flatTx" == name)
return new DocumentFormat.OpenXml.Drawing.FlatText();
return null;
}
private static readonly string[] eleTagNames = { "sp3d","flatTx" };
private static readonly byte[] eleNamespaceIds = { 10,10 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneChoice;}
}
/// <summary>
/// <para> Apply 3D shape properties.</para>
/// <para> Represents the following element tag in the schema: a:sp3d </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.Shape3DType Shape3DType
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.Shape3DType>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> No text in 3D scene.</para>
/// <para> Represents the following element tag in the schema: a:flatTx </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.FlatText FlatText
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.FlatText>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<TextProperties>(deep);
}
}
/// <summary>
/// <para>Title.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:title.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class StyleDefinitionTitle : OpenXmlLeafElement
{
private const string tagName = "title";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10746;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "lang","val" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Natural Language.</para>
/// <para>Represents the following attribute in the schema: lang </para>
/// </summary>
[SchemaAttr(0, "lang")]
public StringValue Language
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Description Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public StringValue Val
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the StyleDefinitionTitle class.
/// </summary>
public StyleDefinitionTitle():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "lang" == name)
return new StringValue();
if( 0 == namespaceId && "val" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<StyleDefinitionTitle>(deep);
}
}
/// <summary>
/// <para>Style Label Description.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:desc.</para>
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class StyleLabelDescription : OpenXmlLeafElement
{
private const string tagName = "desc";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10747;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "lang","val" };
private static byte[] attributeNamespaceIds = { 0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Natural Language.</para>
/// <para>Represents the following attribute in the schema: lang </para>
/// </summary>
[SchemaAttr(0, "lang")]
public StringValue Language
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Description Value.</para>
/// <para>Represents the following attribute in the schema: val </para>
/// </summary>
[SchemaAttr(0, "val")]
public StringValue Val
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// Initializes a new instance of the StyleLabelDescription class.
/// </summary>
public StyleLabelDescription():base(){}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "lang" == name)
return new StringValue();
if( 0 == namespaceId && "val" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<StyleLabelDescription>(deep);
}
}
/// <summary>
/// <para>Category List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:catLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>StyleDisplayCategory <dgm:cat></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(StyleDisplayCategory))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class StyleDisplayCategories : OpenXmlCompositeElement
{
private const string tagName = "catLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10748;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the StyleDisplayCategories class.
/// </summary>
public StyleDisplayCategories():base(){}
/// <summary>
///Initializes a new instance of the StyleDisplayCategories class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleDisplayCategories(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleDisplayCategories class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleDisplayCategories(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleDisplayCategories class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public StyleDisplayCategories(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "cat" == name)
return new StyleDisplayCategory();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<StyleDisplayCategories>(deep);
}
}
/// <summary>
/// <para>Style Label.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:styleLbl.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Scene3D <dgm:scene3d></description></item>
///<item><description>Shape3D <dgm:sp3d></description></item>
///<item><description>TextProperties <dgm:txPr></description></item>
///<item><description>Style <dgm:style></description></item>
///<item><description>ExtensionList <dgm:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Scene3D))]
[ChildElementInfo(typeof(Shape3D))]
[ChildElementInfo(typeof(TextProperties))]
[ChildElementInfo(typeof(Style))]
[ChildElementInfo(typeof(ExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class StyleLabel : OpenXmlCompositeElement
{
private const string tagName = "styleLbl";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10749;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "name" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Style Name.</para>
/// <para>Represents the following attribute in the schema: name </para>
/// </summary>
[SchemaAttr(0, "name")]
public StringValue Name
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the StyleLabel class.
/// </summary>
public StyleLabel():base(){}
/// <summary>
///Initializes a new instance of the StyleLabel class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleLabel(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleLabel class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public StyleLabel(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the StyleLabel class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public StyleLabel(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "scene3d" == name)
return new Scene3D();
if( 14 == namespaceId && "sp3d" == name)
return new Shape3D();
if( 14 == namespaceId && "txPr" == name)
return new TextProperties();
if( 14 == namespaceId && "style" == name)
return new Style();
if( 14 == namespaceId && "extLst" == name)
return new ExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "scene3d","sp3d","txPr","style","extLst" };
private static readonly byte[] eleNamespaceIds = { 14,14,14,14,14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> 3-D Scene.</para>
/// <para> Represents the following element tag in the schema: dgm:scene3d </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public Scene3D Scene3D
{
get
{
return GetElement<Scene3D>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> 3-D Shape Properties.</para>
/// <para> Represents the following element tag in the schema: dgm:sp3d </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public Shape3D Shape3D
{
get
{
return GetElement<Shape3D>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// <para> Text Properties.</para>
/// <para> Represents the following element tag in the schema: dgm:txPr </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public TextProperties TextProperties
{
get
{
return GetElement<TextProperties>(2);
}
set
{
SetElement(2, value);
}
}
/// <summary>
/// <para> Shape Style.</para>
/// <para> Represents the following element tag in the schema: dgm:style </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public Style Style
{
get
{
return GetElement<Style>(3);
}
set
{
SetElement(3, value);
}
}
/// <summary>
/// <para> ExtensionList.</para>
/// <para> Represents the following element tag in the schema: dgm:extLst </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public ExtensionList ExtensionList
{
get
{
return GetElement<ExtensionList>(4);
}
set
{
SetElement(4, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "name" == name)
return new StringValue();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<StyleLabel>(deep);
}
}
/// <summary>
/// <para>Point List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:ptLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Point <dgm:pt></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Point))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class PointList : OpenXmlCompositeElement
{
private const string tagName = "ptLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10750;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the PointList class.
/// </summary>
public PointList():base(){}
/// <summary>
///Initializes a new instance of the PointList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public PointList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the PointList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public PointList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the PointList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public PointList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "pt" == name)
return new Point();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<PointList>(deep);
}
}
/// <summary>
/// <para>Connection List.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:cxnLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>Connection <dgm:cxn></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(Connection))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ConnectionList : OpenXmlCompositeElement
{
private const string tagName = "cxnLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10751;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the ConnectionList class.
/// </summary>
public ConnectionList():base(){}
/// <summary>
///Initializes a new instance of the ConnectionList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ConnectionList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ConnectionList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ConnectionList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ConnectionList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public ConnectionList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "cxn" == name)
return new Connection();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ConnectionList>(deep);
}
}
/// <summary>
/// <para>Background Formatting.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:bg.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.NoFill <a:noFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SolidFill <a:solidFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.GradientFill <a:gradFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.BlipFill <a:blipFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.PatternFill <a:pattFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.GroupFill <a:grpFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.EffectList <a:effectLst></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.EffectDag <a:effectDag></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.NoFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.SolidFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.GradientFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.BlipFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.PatternFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.GroupFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.EffectList))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.EffectDag))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Background : OpenXmlCompositeElement
{
private const string tagName = "bg";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10752;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the Background class.
/// </summary>
public Background():base(){}
/// <summary>
///Initializes a new instance of the Background class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Background(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Background class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Background(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Background class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Background(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "noFill" == name)
return new DocumentFormat.OpenXml.Drawing.NoFill();
if( 10 == namespaceId && "solidFill" == name)
return new DocumentFormat.OpenXml.Drawing.SolidFill();
if( 10 == namespaceId && "gradFill" == name)
return new DocumentFormat.OpenXml.Drawing.GradientFill();
if( 10 == namespaceId && "blipFill" == name)
return new DocumentFormat.OpenXml.Drawing.BlipFill();
if( 10 == namespaceId && "pattFill" == name)
return new DocumentFormat.OpenXml.Drawing.PatternFill();
if( 10 == namespaceId && "grpFill" == name)
return new DocumentFormat.OpenXml.Drawing.GroupFill();
if( 10 == namespaceId && "effectLst" == name)
return new DocumentFormat.OpenXml.Drawing.EffectList();
if( 10 == namespaceId && "effectDag" == name)
return new DocumentFormat.OpenXml.Drawing.EffectDag();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Background>(deep);
}
}
/// <summary>
/// <para>Whole E2O Formatting.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:whole.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.Outline <a:ln></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.EffectList <a:effectLst></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.EffectDag <a:effectDag></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.Outline))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.EffectList))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.EffectDag))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class Whole : OpenXmlCompositeElement
{
private const string tagName = "whole";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10753;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the Whole class.
/// </summary>
public Whole():base(){}
/// <summary>
///Initializes a new instance of the Whole class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Whole(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Whole class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public Whole(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the Whole class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public Whole(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "ln" == name)
return new DocumentFormat.OpenXml.Drawing.Outline();
if( 10 == namespaceId && "effectLst" == name)
return new DocumentFormat.OpenXml.Drawing.EffectList();
if( 10 == namespaceId && "effectDag" == name)
return new DocumentFormat.OpenXml.Drawing.EffectDag();
return null;
}
private static readonly string[] eleTagNames = { "ln","effectLst","effectDag" };
private static readonly byte[] eleNamespaceIds = { 10,10,10 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Outline.</para>
/// <para> Represents the following element tag in the schema: a:ln </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.Outline Outline
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.Outline>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<Whole>(deep);
}
}
/// <summary>
/// <para>Defines the DataModelExtensionList Class.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:extLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.DataModelExtension <a:ext></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.DataModelExtension))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class DataModelExtensionList : OpenXmlCompositeElement
{
private const string tagName = "extLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10754;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the DataModelExtensionList class.
/// </summary>
public DataModelExtensionList():base(){}
/// <summary>
///Initializes a new instance of the DataModelExtensionList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public DataModelExtensionList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the DataModelExtensionList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public DataModelExtensionList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the DataModelExtensionList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public DataModelExtensionList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "ext" == name)
return new DocumentFormat.OpenXml.Drawing.DataModelExtension();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<DataModelExtensionList>(deep);
}
}
/// <summary>
/// <para>Property Set.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:prSet.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>PresentationLayoutVariables <dgm:presLayoutVars></description></item>
///<item><description>Style <dgm:style></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(PresentationLayoutVariables))]
[ChildElementInfo(typeof(Style))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class PropertySet : OpenXmlCompositeElement
{
private const string tagName = "prSet";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10755;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "presAssocID","presName","presStyleLbl","presStyleIdx","presStyleCnt","loTypeId","loCatId","qsTypeId","qsCatId","csTypeId","csCatId","coherent3DOff","phldrT","phldr","custAng","custFlipVert","custFlipHor","custSzX","custSzY","custScaleX","custScaleY","custT","custLinFactX","custLinFactY","custLinFactNeighborX","custLinFactNeighborY","custRadScaleRad","custRadScaleInc" };
private static byte[] attributeNamespaceIds = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Presentation Element Identifier.</para>
/// <para>Represents the following attribute in the schema: presAssocID </para>
/// </summary>
[SchemaAttr(0, "presAssocID")]
public StringValue PresentationElementId
{
get { return (StringValue)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// <para> Presentation Name.</para>
/// <para>Represents the following attribute in the schema: presName </para>
/// </summary>
[SchemaAttr(0, "presName")]
public StringValue PresentationName
{
get { return (StringValue)Attributes[1]; }
set { Attributes[1] = value; }
}
/// <summary>
/// <para> Presentation Style Label.</para>
/// <para>Represents the following attribute in the schema: presStyleLbl </para>
/// </summary>
[SchemaAttr(0, "presStyleLbl")]
public StringValue PresentationStyleLabel
{
get { return (StringValue)Attributes[2]; }
set { Attributes[2] = value; }
}
/// <summary>
/// <para> Presentation Style Index.</para>
/// <para>Represents the following attribute in the schema: presStyleIdx </para>
/// </summary>
[SchemaAttr(0, "presStyleIdx")]
public Int32Value PresentationStyleIndex
{
get { return (Int32Value)Attributes[3]; }
set { Attributes[3] = value; }
}
/// <summary>
/// <para> Presentation Style Count.</para>
/// <para>Represents the following attribute in the schema: presStyleCnt </para>
/// </summary>
[SchemaAttr(0, "presStyleCnt")]
public Int32Value PresentationStyleCount
{
get { return (Int32Value)Attributes[4]; }
set { Attributes[4] = value; }
}
/// <summary>
/// <para> Current Diagram Type.</para>
/// <para>Represents the following attribute in the schema: loTypeId </para>
/// </summary>
[SchemaAttr(0, "loTypeId")]
public StringValue LayoutTypeId
{
get { return (StringValue)Attributes[5]; }
set { Attributes[5] = value; }
}
/// <summary>
/// <para> Current Diagram Category.</para>
/// <para>Represents the following attribute in the schema: loCatId </para>
/// </summary>
[SchemaAttr(0, "loCatId")]
public StringValue LayoutCategoryId
{
get { return (StringValue)Attributes[6]; }
set { Attributes[6] = value; }
}
/// <summary>
/// <para> Current Style Type.</para>
/// <para>Represents the following attribute in the schema: qsTypeId </para>
/// </summary>
[SchemaAttr(0, "qsTypeId")]
public StringValue QuickStyleTypeId
{
get { return (StringValue)Attributes[7]; }
set { Attributes[7] = value; }
}
/// <summary>
/// <para> Current Style Category.</para>
/// <para>Represents the following attribute in the schema: qsCatId </para>
/// </summary>
[SchemaAttr(0, "qsCatId")]
public StringValue QuickStyleCategoryId
{
get { return (StringValue)Attributes[8]; }
set { Attributes[8] = value; }
}
/// <summary>
/// <para> Color Transform Type Identifier.</para>
/// <para>Represents the following attribute in the schema: csTypeId </para>
/// </summary>
[SchemaAttr(0, "csTypeId")]
public StringValue ColorType
{
get { return (StringValue)Attributes[9]; }
set { Attributes[9] = value; }
}
/// <summary>
/// <para> Color Transform Category.</para>
/// <para>Represents the following attribute in the schema: csCatId </para>
/// </summary>
[SchemaAttr(0, "csCatId")]
public StringValue ColorCategoryId
{
get { return (StringValue)Attributes[10]; }
set { Attributes[10] = value; }
}
/// <summary>
/// <para> Coherent 3D Behavior.</para>
/// <para>Represents the following attribute in the schema: coherent3DOff </para>
/// </summary>
[SchemaAttr(0, "coherent3DOff")]
public BooleanValue Coherent3D
{
get { return (BooleanValue)Attributes[11]; }
set { Attributes[11] = value; }
}
/// <summary>
/// <para> Placeholder Text.</para>
/// <para>Represents the following attribute in the schema: phldrT </para>
/// </summary>
[SchemaAttr(0, "phldrT")]
public StringValue PlaceholderText
{
get { return (StringValue)Attributes[12]; }
set { Attributes[12] = value; }
}
/// <summary>
/// <para> Placeholder.</para>
/// <para>Represents the following attribute in the schema: phldr </para>
/// </summary>
[SchemaAttr(0, "phldr")]
public BooleanValue Placeholder
{
get { return (BooleanValue)Attributes[13]; }
set { Attributes[13] = value; }
}
/// <summary>
/// <para> Custom Rotation.</para>
/// <para>Represents the following attribute in the schema: custAng </para>
/// </summary>
[SchemaAttr(0, "custAng")]
public Int32Value Rotation
{
get { return (Int32Value)Attributes[14]; }
set { Attributes[14] = value; }
}
/// <summary>
/// <para> Custom Vertical Flip.</para>
/// <para>Represents the following attribute in the schema: custFlipVert </para>
/// </summary>
[SchemaAttr(0, "custFlipVert")]
public BooleanValue VerticalFlip
{
get { return (BooleanValue)Attributes[15]; }
set { Attributes[15] = value; }
}
/// <summary>
/// <para> Custom Horizontal Flip.</para>
/// <para>Represents the following attribute in the schema: custFlipHor </para>
/// </summary>
[SchemaAttr(0, "custFlipHor")]
public BooleanValue HorizontalFlip
{
get { return (BooleanValue)Attributes[16]; }
set { Attributes[16] = value; }
}
/// <summary>
/// <para> Fixed Width Override.</para>
/// <para>Represents the following attribute in the schema: custSzX </para>
/// </summary>
[SchemaAttr(0, "custSzX")]
public Int32Value FixedWidthOverride
{
get { return (Int32Value)Attributes[17]; }
set { Attributes[17] = value; }
}
/// <summary>
/// <para> Fixed Height Override.</para>
/// <para>Represents the following attribute in the schema: custSzY </para>
/// </summary>
[SchemaAttr(0, "custSzY")]
public Int32Value FixedHeightOverride
{
get { return (Int32Value)Attributes[18]; }
set { Attributes[18] = value; }
}
/// <summary>
/// <para> Width Scale.</para>
/// <para>Represents the following attribute in the schema: custScaleX </para>
/// </summary>
[SchemaAttr(0, "custScaleX")]
public Int32Value WidthScale
{
get { return (Int32Value)Attributes[19]; }
set { Attributes[19] = value; }
}
/// <summary>
/// <para> Height Scale.</para>
/// <para>Represents the following attribute in the schema: custScaleY </para>
/// </summary>
[SchemaAttr(0, "custScaleY")]
public Int32Value HightScale
{
get { return (Int32Value)Attributes[20]; }
set { Attributes[20] = value; }
}
/// <summary>
/// <para> Text Changed.</para>
/// <para>Represents the following attribute in the schema: custT </para>
/// </summary>
[SchemaAttr(0, "custT")]
public BooleanValue TextChanged
{
get { return (BooleanValue)Attributes[21]; }
set { Attributes[21] = value; }
}
/// <summary>
/// <para> Custom Factor Width.</para>
/// <para>Represents the following attribute in the schema: custLinFactX </para>
/// </summary>
[SchemaAttr(0, "custLinFactX")]
public Int32Value FactorWidth
{
get { return (Int32Value)Attributes[22]; }
set { Attributes[22] = value; }
}
/// <summary>
/// <para> Custom Factor Height.</para>
/// <para>Represents the following attribute in the schema: custLinFactY </para>
/// </summary>
[SchemaAttr(0, "custLinFactY")]
public Int32Value FactorHeight
{
get { return (Int32Value)Attributes[23]; }
set { Attributes[23] = value; }
}
/// <summary>
/// <para> Neighbor Offset Width.</para>
/// <para>Represents the following attribute in the schema: custLinFactNeighborX </para>
/// </summary>
[SchemaAttr(0, "custLinFactNeighborX")]
public Int32Value NeighborOffsetWidth
{
get { return (Int32Value)Attributes[24]; }
set { Attributes[24] = value; }
}
/// <summary>
/// <para> Neighbor Offset Height.</para>
/// <para>Represents the following attribute in the schema: custLinFactNeighborY </para>
/// </summary>
[SchemaAttr(0, "custLinFactNeighborY")]
public Int32Value NeighborOffsetHeight
{
get { return (Int32Value)Attributes[25]; }
set { Attributes[25] = value; }
}
/// <summary>
/// <para> Radius Scale.</para>
/// <para>Represents the following attribute in the schema: custRadScaleRad </para>
/// </summary>
[SchemaAttr(0, "custRadScaleRad")]
public Int32Value RadiusScale
{
get { return (Int32Value)Attributes[26]; }
set { Attributes[26] = value; }
}
/// <summary>
/// <para> Include Angle Scale.</para>
/// <para>Represents the following attribute in the schema: custRadScaleInc </para>
/// </summary>
[SchemaAttr(0, "custRadScaleInc")]
public Int32Value IncludeAngleScale
{
get { return (Int32Value)Attributes[27]; }
set { Attributes[27] = value; }
}
/// <summary>
/// Initializes a new instance of the PropertySet class.
/// </summary>
public PropertySet():base(){}
/// <summary>
///Initializes a new instance of the PropertySet class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public PropertySet(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the PropertySet class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public PropertySet(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the PropertySet class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public PropertySet(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 14 == namespaceId && "presLayoutVars" == name)
return new PresentationLayoutVariables();
if( 14 == namespaceId && "style" == name)
return new Style();
return null;
}
private static readonly string[] eleTagNames = { "presLayoutVars","style" };
private static readonly byte[] eleNamespaceIds = { 14,14 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Presentation Layout Variables.</para>
/// <para> Represents the following element tag in the schema: dgm:presLayoutVars </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public PresentationLayoutVariables PresentationLayoutVariables
{
get
{
return GetElement<PresentationLayoutVariables>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> Shape Style.</para>
/// <para> Represents the following element tag in the schema: dgm:style </para>
/// </summary>
/// <remark>
/// xmlns:dgm = http://schemas.openxmlformats.org/drawingml/2006/diagram
/// </remark>
public Style Style
{
get
{
return GetElement<Style>(1);
}
set
{
SetElement(1, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "presAssocID" == name)
return new StringValue();
if( 0 == namespaceId && "presName" == name)
return new StringValue();
if( 0 == namespaceId && "presStyleLbl" == name)
return new StringValue();
if( 0 == namespaceId && "presStyleIdx" == name)
return new Int32Value();
if( 0 == namespaceId && "presStyleCnt" == name)
return new Int32Value();
if( 0 == namespaceId && "loTypeId" == name)
return new StringValue();
if( 0 == namespaceId && "loCatId" == name)
return new StringValue();
if( 0 == namespaceId && "qsTypeId" == name)
return new StringValue();
if( 0 == namespaceId && "qsCatId" == name)
return new StringValue();
if( 0 == namespaceId && "csTypeId" == name)
return new StringValue();
if( 0 == namespaceId && "csCatId" == name)
return new StringValue();
if( 0 == namespaceId && "coherent3DOff" == name)
return new BooleanValue();
if( 0 == namespaceId && "phldrT" == name)
return new StringValue();
if( 0 == namespaceId && "phldr" == name)
return new BooleanValue();
if( 0 == namespaceId && "custAng" == name)
return new Int32Value();
if( 0 == namespaceId && "custFlipVert" == name)
return new BooleanValue();
if( 0 == namespaceId && "custFlipHor" == name)
return new BooleanValue();
if( 0 == namespaceId && "custSzX" == name)
return new Int32Value();
if( 0 == namespaceId && "custSzY" == name)
return new Int32Value();
if( 0 == namespaceId && "custScaleX" == name)
return new Int32Value();
if( 0 == namespaceId && "custScaleY" == name)
return new Int32Value();
if( 0 == namespaceId && "custT" == name)
return new BooleanValue();
if( 0 == namespaceId && "custLinFactX" == name)
return new Int32Value();
if( 0 == namespaceId && "custLinFactY" == name)
return new Int32Value();
if( 0 == namespaceId && "custLinFactNeighborX" == name)
return new Int32Value();
if( 0 == namespaceId && "custLinFactNeighborY" == name)
return new Int32Value();
if( 0 == namespaceId && "custRadScaleRad" == name)
return new Int32Value();
if( 0 == namespaceId && "custRadScaleInc" == name)
return new Int32Value();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<PropertySet>(deep);
}
}
/// <summary>
/// <para>Shape Properties.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:spPr.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.Transform2D <a:xfrm></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.CustomGeometry <a:custGeom></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.PresetGeometry <a:prstGeom></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.NoFill <a:noFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.SolidFill <a:solidFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.GradientFill <a:gradFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.BlipFill <a:blipFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.PatternFill <a:pattFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.GroupFill <a:grpFill></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.Outline <a:ln></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.EffectList <a:effectLst></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.EffectDag <a:effectDag></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.Scene3DType <a:scene3d></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.Shape3DType <a:sp3d></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.ShapePropertiesExtensionList <a:extLst></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.Transform2D))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.CustomGeometry))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.PresetGeometry))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.NoFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.SolidFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.GradientFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.BlipFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.PatternFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.GroupFill))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.Outline))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.EffectList))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.EffectDag))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.Scene3DType))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.Shape3DType))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.ShapePropertiesExtensionList))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class ShapeProperties : OpenXmlCompositeElement
{
private const string tagName = "spPr";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10756;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
private static string[] attributeTagNames = { "bwMode" };
private static byte[] attributeNamespaceIds = { 0 };
internal override string[] AttributeTagNames {
get{
return attributeTagNames;
}
}
internal override byte[] AttributeNamespaceIds {
get{
return attributeNamespaceIds;
}
}
/// <summary>
/// <para> Black and White Mode.</para>
/// <para>Represents the following attribute in the schema: bwMode </para>
/// </summary>
[SchemaAttr(0, "bwMode")]
public EnumValue<DocumentFormat.OpenXml.Drawing.BlackWhiteModeValues> BlackWhiteMode
{
get { return (EnumValue<DocumentFormat.OpenXml.Drawing.BlackWhiteModeValues>)Attributes[0]; }
set { Attributes[0] = value; }
}
/// <summary>
/// Initializes a new instance of the ShapeProperties class.
/// </summary>
public ShapeProperties():base(){}
/// <summary>
///Initializes a new instance of the ShapeProperties class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ShapeProperties(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ShapeProperties class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public ShapeProperties(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the ShapeProperties class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public ShapeProperties(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "xfrm" == name)
return new DocumentFormat.OpenXml.Drawing.Transform2D();
if( 10 == namespaceId && "custGeom" == name)
return new DocumentFormat.OpenXml.Drawing.CustomGeometry();
if( 10 == namespaceId && "prstGeom" == name)
return new DocumentFormat.OpenXml.Drawing.PresetGeometry();
if( 10 == namespaceId && "noFill" == name)
return new DocumentFormat.OpenXml.Drawing.NoFill();
if( 10 == namespaceId && "solidFill" == name)
return new DocumentFormat.OpenXml.Drawing.SolidFill();
if( 10 == namespaceId && "gradFill" == name)
return new DocumentFormat.OpenXml.Drawing.GradientFill();
if( 10 == namespaceId && "blipFill" == name)
return new DocumentFormat.OpenXml.Drawing.BlipFill();
if( 10 == namespaceId && "pattFill" == name)
return new DocumentFormat.OpenXml.Drawing.PatternFill();
if( 10 == namespaceId && "grpFill" == name)
return new DocumentFormat.OpenXml.Drawing.GroupFill();
if( 10 == namespaceId && "ln" == name)
return new DocumentFormat.OpenXml.Drawing.Outline();
if( 10 == namespaceId && "effectLst" == name)
return new DocumentFormat.OpenXml.Drawing.EffectList();
if( 10 == namespaceId && "effectDag" == name)
return new DocumentFormat.OpenXml.Drawing.EffectDag();
if( 10 == namespaceId && "scene3d" == name)
return new DocumentFormat.OpenXml.Drawing.Scene3DType();
if( 10 == namespaceId && "sp3d" == name)
return new DocumentFormat.OpenXml.Drawing.Shape3DType();
if( 10 == namespaceId && "extLst" == name)
return new DocumentFormat.OpenXml.Drawing.ShapePropertiesExtensionList();
return null;
}
private static readonly string[] eleTagNames = { "xfrm","custGeom","prstGeom","noFill","solidFill","gradFill","blipFill","pattFill","grpFill","ln","effectLst","effectDag","scene3d","sp3d","extLst" };
private static readonly byte[] eleNamespaceIds = { 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> 2D Transform for Individual Objects.</para>
/// <para> Represents the following element tag in the schema: a:xfrm </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.Transform2D Transform2D
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.Transform2D>(0);
}
set
{
SetElement(0, value);
}
}
internal override OpenXmlSimpleType AttributeFactory(byte namespaceId, string name)
{
if( 0 == namespaceId && "bwMode" == name)
return new EnumValue<DocumentFormat.OpenXml.Drawing.BlackWhiteModeValues>();
return base.AttributeFactory(namespaceId, name);
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<ShapeProperties>(deep);
}
}
/// <summary>
/// <para>Text Body.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:t.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.BodyProperties <a:bodyPr></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.ListStyle <a:lstStyle></description></item>
///<item><description>DocumentFormat.OpenXml.Drawing.Paragraph <a:p></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.BodyProperties))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.ListStyle))]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.Paragraph))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class TextBody : OpenXmlCompositeElement
{
private const string tagName = "t";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10757;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the TextBody class.
/// </summary>
public TextBody():base(){}
/// <summary>
///Initializes a new instance of the TextBody class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public TextBody(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the TextBody class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public TextBody(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the TextBody class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public TextBody(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "bodyPr" == name)
return new DocumentFormat.OpenXml.Drawing.BodyProperties();
if( 10 == namespaceId && "lstStyle" == name)
return new DocumentFormat.OpenXml.Drawing.ListStyle();
if( 10 == namespaceId && "p" == name)
return new DocumentFormat.OpenXml.Drawing.Paragraph();
return null;
}
private static readonly string[] eleTagNames = { "bodyPr","lstStyle","p" };
private static readonly byte[] eleNamespaceIds = { 10,10,10 };
internal override string[] ElementTagNames {
get{
return eleTagNames;
}
}
internal override byte[] ElementNamespaceIds {
get{
return eleNamespaceIds;
}
}
internal override OpenXmlCompositeType OpenXmlCompositeType
{
get {return OpenXmlCompositeType.OneSequence;}
}
/// <summary>
/// <para> Body Properties.</para>
/// <para> Represents the following element tag in the schema: a:bodyPr </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.BodyProperties BodyProperties
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.BodyProperties>(0);
}
set
{
SetElement(0, value);
}
}
/// <summary>
/// <para> Text List Styles.</para>
/// <para> Represents the following element tag in the schema: a:lstStyle </para>
/// </summary>
/// <remark>
/// xmlns:a = http://schemas.openxmlformats.org/drawingml/2006/main
/// </remark>
public DocumentFormat.OpenXml.Drawing.ListStyle ListStyle
{
get
{
return GetElement<DocumentFormat.OpenXml.Drawing.ListStyle>(1);
}
set
{
SetElement(1, value);
}
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<TextBody>(deep);
}
}
/// <summary>
/// <para>Defines the PtExtensionList Class.</para>
/// <para> When the object is serialized out as xml, its qualified name is dgm:extLst.</para>
/// </summary>
/// <remarks>
/// The following table lists the possible child types:
/// <list type="bullet">
///<item><description>DocumentFormat.OpenXml.Drawing.PtExtension <a:ext></description></item>
/// </list>
/// </remarks>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")]
[ChildElementInfo(typeof(DocumentFormat.OpenXml.Drawing.PtExtension))]
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public partial class PtExtensionList : OpenXmlCompositeElement
{
private const string tagName = "extLst";
/// <summary>
/// Gets the local name of the element.
/// </summary>
public override string LocalName
{
get { return tagName; }
}
private const byte tagNsId = 14;
internal override byte NamespaceId
{
get { return tagNsId; }
}
internal const int ElementTypeIdConst = 10758;
/// <summary>
/// Gets the type ID of the element.
/// </summary>
internal override int ElementTypeId
{
get { return ElementTypeIdConst; }
}
/// <summary>
/// Whether this element is available in a specific version of Office Application.
/// </summary>
/// <param name="version">The Office file format version.</param>
/// <returns>Returns true if the element is defined in the specified version.</returns>
internal override bool IsInVersion(FileFormatVersions version)
{
if((15 & (int)version) > 0)
{
return true;
}
return false;
}
/// <summary>
/// Initializes a new instance of the PtExtensionList class.
/// </summary>
public PtExtensionList():base(){}
/// <summary>
///Initializes a new instance of the PtExtensionList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public PtExtensionList(System.Collections.Generic.IEnumerable<OpenXmlElement> childElements)
: base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the PtExtensionList class with the specified child elements.
/// </summary>
/// <param name="childElements">Specifies the child elements.</param>
public PtExtensionList(params OpenXmlElement[] childElements) : base(childElements)
{
}
/// <summary>
/// Initializes a new instance of the PtExtensionList class from outer XML.
/// </summary>
/// <param name="outerXml">Specifies the outer XML of the element.</param>
public PtExtensionList(string outerXml)
: base(outerXml)
{
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
internal override OpenXmlElement ElementFactory(byte namespaceId, string name)
{
if( 10 == namespaceId && "ext" == name)
return new DocumentFormat.OpenXml.Drawing.PtExtension();
return null;
}
/// <summary>
/// Creates a duplicate of this node.
/// </summary>
/// <param name="deep">True to recursively clone the subtree under the specified node; false to clone only the node itself. </param>
/// <returns>Returns the cloned node. </returns>
public override OpenXmlElement CloneNode(bool deep)
{
return CloneImp<PtExtensionList>(deep);
}
}
/// <summary>
/// Color Application Method Type
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ColorApplicationMethodValues
{
///<summary>
///Span.
///<para>When the item is serialized out as xml, its value is "span".</para>
///</summary>
[EnumString("span")]
Span,
///<summary>
///Cycle.
///<para>When the item is serialized out as xml, its value is "cycle".</para>
///</summary>
[EnumString("cycle")]
Cycle,
///<summary>
///Repeat.
///<para>When the item is serialized out as xml, its value is "repeat".</para>
///</summary>
[EnumString("repeat")]
Repeat,
}
/// <summary>
/// Hue Direction
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum HueDirectionValues
{
///<summary>
///Clockwise Hue Direction.
///<para>When the item is serialized out as xml, its value is "cw".</para>
///</summary>
[EnumString("cw")]
Clockwise,
///<summary>
///Counterclockwise Hue Direction.
///<para>When the item is serialized out as xml, its value is "ccw".</para>
///</summary>
[EnumString("ccw")]
Counterclockwise,
}
/// <summary>
/// Point Type
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum PointValues
{
///<summary>
///Node.
///<para>When the item is serialized out as xml, its value is "node".</para>
///</summary>
[EnumString("node")]
Node,
///<summary>
///Assistant Element.
///<para>When the item is serialized out as xml, its value is "asst".</para>
///</summary>
[EnumString("asst")]
Assistant,
///<summary>
///Document.
///<para>When the item is serialized out as xml, its value is "doc".</para>
///</summary>
[EnumString("doc")]
Document,
///<summary>
///Presentation.
///<para>When the item is serialized out as xml, its value is "pres".</para>
///</summary>
[EnumString("pres")]
Presentation,
///<summary>
///Parent Transition.
///<para>When the item is serialized out as xml, its value is "parTrans".</para>
///</summary>
[EnumString("parTrans")]
ParentTransition,
///<summary>
///Sibling Transition.
///<para>When the item is serialized out as xml, its value is "sibTrans".</para>
///</summary>
[EnumString("sibTrans")]
SiblingTransition,
}
/// <summary>
/// Connection Type
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ConnectionValues
{
///<summary>
///Parent Of.
///<para>When the item is serialized out as xml, its value is "parOf".</para>
///</summary>
[EnumString("parOf")]
ParentOf,
///<summary>
///Presentation Of.
///<para>When the item is serialized out as xml, its value is "presOf".</para>
///</summary>
[EnumString("presOf")]
PresentationOf,
///<summary>
///Presentation Parent Of.
///<para>When the item is serialized out as xml, its value is "presParOf".</para>
///</summary>
[EnumString("presParOf")]
PresentationParentOf,
///<summary>
///Unknown Relationship.
///<para>When the item is serialized out as xml, its value is "unknownRelationship".</para>
///</summary>
[EnumString("unknownRelationship")]
UnknownRelationship,
}
/// <summary>
/// Diagram Direction Definition
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum DirectionValues
{
///<summary>
///Normal Direction.
///<para>When the item is serialized out as xml, its value is "norm".</para>
///</summary>
[EnumString("norm")]
Normal,
///<summary>
///Reversed Direction.
///<para>When the item is serialized out as xml, its value is "rev".</para>
///</summary>
[EnumString("rev")]
Reversed,
}
/// <summary>
/// Hierarchy Branch Style Definition
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum HierarchyBranchStyleValues
{
///<summary>
///Left.
///<para>When the item is serialized out as xml, its value is "l".</para>
///</summary>
[EnumString("l")]
Left,
///<summary>
///Right.
///<para>When the item is serialized out as xml, its value is "r".</para>
///</summary>
[EnumString("r")]
Right,
///<summary>
///Hanging.
///<para>When the item is serialized out as xml, its value is "hang".</para>
///</summary>
[EnumString("hang")]
Hanging,
///<summary>
///Standard.
///<para>When the item is serialized out as xml, its value is "std".</para>
///</summary>
[EnumString("std")]
Standard,
///<summary>
///Initial.
///<para>When the item is serialized out as xml, its value is "init".</para>
///</summary>
[EnumString("init")]
Initial,
}
/// <summary>
/// One by One Animation Value Definition
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum AnimateOneByOneValues
{
///<summary>
///Disable One-by-One.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///One By One.
///<para>When the item is serialized out as xml, its value is "one".</para>
///</summary>
[EnumString("one")]
One,
///<summary>
///By Branch One By One.
///<para>When the item is serialized out as xml, its value is "branch".</para>
///</summary>
[EnumString("branch")]
Branch,
}
/// <summary>
/// Animation Level String Definition
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum AnimationLevelStringValues
{
///<summary>
///Disable Level At Once.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///By Level Animation.
///<para>When the item is serialized out as xml, its value is "lvl".</para>
///</summary>
[EnumString("lvl")]
Level,
///<summary>
///From Center Animation.
///<para>When the item is serialized out as xml, its value is "ctr".</para>
///</summary>
[EnumString("ctr")]
Center,
}
/// <summary>
/// Resize Handle
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ResizeHandlesStringValues
{
///<summary>
///Exact.
///<para>When the item is serialized out as xml, its value is "exact".</para>
///</summary>
[EnumString("exact")]
Exact,
///<summary>
///Relative.
///<para>When the item is serialized out as xml, its value is "rel".</para>
///</summary>
[EnumString("rel")]
Relative,
}
/// <summary>
/// Algorithm Types
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum AlgorithmValues
{
///<summary>
///Composite.
///<para>When the item is serialized out as xml, its value is "composite".</para>
///</summary>
[EnumString("composite")]
Composite,
///<summary>
///Connector Algorithm.
///<para>When the item is serialized out as xml, its value is "conn".</para>
///</summary>
[EnumString("conn")]
Connector,
///<summary>
///Cycle Algorithm.
///<para>When the item is serialized out as xml, its value is "cycle".</para>
///</summary>
[EnumString("cycle")]
Cycle,
///<summary>
///Hierarchy Child Algorithm.
///<para>When the item is serialized out as xml, its value is "hierChild".</para>
///</summary>
[EnumString("hierChild")]
HierarchyChild,
///<summary>
///Hierarchy Root Algorithm.
///<para>When the item is serialized out as xml, its value is "hierRoot".</para>
///</summary>
[EnumString("hierRoot")]
HierarchyRoot,
///<summary>
///Pyramid Algorithm.
///<para>When the item is serialized out as xml, its value is "pyra".</para>
///</summary>
[EnumString("pyra")]
Pyramid,
///<summary>
///Linear Algorithm.
///<para>When the item is serialized out as xml, its value is "lin".</para>
///</summary>
[EnumString("lin")]
Linear,
///<summary>
///Space Algorithm.
///<para>When the item is serialized out as xml, its value is "sp".</para>
///</summary>
[EnumString("sp")]
Space,
///<summary>
///Text Algorithm.
///<para>When the item is serialized out as xml, its value is "tx".</para>
///</summary>
[EnumString("tx")]
Text,
///<summary>
///Snake Algorithm.
///<para>When the item is serialized out as xml, its value is "snake".</para>
///</summary>
[EnumString("snake")]
Snake,
}
/// <summary>
/// Axis Type
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum AxisValues
{
///<summary>
///Self.
///<para>When the item is serialized out as xml, its value is "self".</para>
///</summary>
[EnumString("self")]
Self,
///<summary>
///Child.
///<para>When the item is serialized out as xml, its value is "ch".</para>
///</summary>
[EnumString("ch")]
Child,
///<summary>
///Descendant.
///<para>When the item is serialized out as xml, its value is "des".</para>
///</summary>
[EnumString("des")]
Descendant,
///<summary>
///Descendant or Self.
///<para>When the item is serialized out as xml, its value is "desOrSelf".</para>
///</summary>
[EnumString("desOrSelf")]
DescendantOrSelf,
///<summary>
///Parent.
///<para>When the item is serialized out as xml, its value is "par".</para>
///</summary>
[EnumString("par")]
Parent,
///<summary>
///Ancestor.
///<para>When the item is serialized out as xml, its value is "ancst".</para>
///</summary>
[EnumString("ancst")]
Ancestor,
///<summary>
///Ancestor or Self.
///<para>When the item is serialized out as xml, its value is "ancstOrSelf".</para>
///</summary>
[EnumString("ancstOrSelf")]
AncestorOrSelf,
///<summary>
///Follow Sibling.
///<para>When the item is serialized out as xml, its value is "followSib".</para>
///</summary>
[EnumString("followSib")]
FollowSibling,
///<summary>
///Preceding Sibling.
///<para>When the item is serialized out as xml, its value is "precedSib".</para>
///</summary>
[EnumString("precedSib")]
PrecedingSibling,
///<summary>
///Follow.
///<para>When the item is serialized out as xml, its value is "follow".</para>
///</summary>
[EnumString("follow")]
Follow,
///<summary>
///Preceding.
///<para>When the item is serialized out as xml, its value is "preced".</para>
///</summary>
[EnumString("preced")]
Preceding,
///<summary>
///Root.
///<para>When the item is serialized out as xml, its value is "root".</para>
///</summary>
[EnumString("root")]
Root,
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
}
/// <summary>
/// Boolean Constraint
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum BoolOperatorValues
{
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///Equal.
///<para>When the item is serialized out as xml, its value is "equ".</para>
///</summary>
[EnumString("equ")]
Equal,
///<summary>
///Greater Than or Equal to.
///<para>When the item is serialized out as xml, its value is "gte".</para>
///</summary>
[EnumString("gte")]
GreaterThanOrEqualTo,
///<summary>
///Less Than or Equal to.
///<para>When the item is serialized out as xml, its value is "lte".</para>
///</summary>
[EnumString("lte")]
LessThanOrEqualTo,
}
/// <summary>
/// Child Order
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ChildOrderValues
{
///<summary>
///Bottom.
///<para>When the item is serialized out as xml, its value is "b".</para>
///</summary>
[EnumString("b")]
Bottom,
///<summary>
///Top.
///<para>When the item is serialized out as xml, its value is "t".</para>
///</summary>
[EnumString("t")]
Top,
}
/// <summary>
/// Constraint Type
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ConstraintValues
{
///<summary>
///Unknown.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///Alignment Offset.
///<para>When the item is serialized out as xml, its value is "alignOff".</para>
///</summary>
[EnumString("alignOff")]
AlignmentOffset,
///<summary>
///Beginning Margin.
///<para>When the item is serialized out as xml, its value is "begMarg".</para>
///</summary>
[EnumString("begMarg")]
BeginningMargin,
///<summary>
///Bending Distance.
///<para>When the item is serialized out as xml, its value is "bendDist".</para>
///</summary>
[EnumString("bendDist")]
BendingDistance,
///<summary>
///Beginning Padding.
///<para>When the item is serialized out as xml, its value is "begPad".</para>
///</summary>
[EnumString("begPad")]
BeginningPadding,
///<summary>
///Bottom.
///<para>When the item is serialized out as xml, its value is "b".</para>
///</summary>
[EnumString("b")]
Bottom,
///<summary>
///Bottom Margin.
///<para>When the item is serialized out as xml, its value is "bMarg".</para>
///</summary>
[EnumString("bMarg")]
BottomMargin,
///<summary>
///Bottom Offset.
///<para>When the item is serialized out as xml, its value is "bOff".</para>
///</summary>
[EnumString("bOff")]
BottomOffset,
///<summary>
///Center Height.
///<para>When the item is serialized out as xml, its value is "ctrX".</para>
///</summary>
[EnumString("ctrX")]
CenterHeight,
///<summary>
///Center X Offset.
///<para>When the item is serialized out as xml, its value is "ctrXOff".</para>
///</summary>
[EnumString("ctrXOff")]
CenterXOffset,
///<summary>
///Center Width.
///<para>When the item is serialized out as xml, its value is "ctrY".</para>
///</summary>
[EnumString("ctrY")]
CenterWidth,
///<summary>
///Center Y Offset.
///<para>When the item is serialized out as xml, its value is "ctrYOff".</para>
///</summary>
[EnumString("ctrYOff")]
CenterYOffset,
///<summary>
///Connection Distance.
///<para>When the item is serialized out as xml, its value is "connDist".</para>
///</summary>
[EnumString("connDist")]
ConnectionDistance,
///<summary>
///Diameter.
///<para>When the item is serialized out as xml, its value is "diam".</para>
///</summary>
[EnumString("diam")]
Diameter,
///<summary>
///End Margin.
///<para>When the item is serialized out as xml, its value is "endMarg".</para>
///</summary>
[EnumString("endMarg")]
EndMargin,
///<summary>
///End Padding.
///<para>When the item is serialized out as xml, its value is "endPad".</para>
///</summary>
[EnumString("endPad")]
EndPadding,
///<summary>
///Height.
///<para>When the item is serialized out as xml, its value is "h".</para>
///</summary>
[EnumString("h")]
Height,
///<summary>
///Arrowhead Height.
///<para>When the item is serialized out as xml, its value is "hArH".</para>
///</summary>
[EnumString("hArH")]
ArrowheadHeight,
///<summary>
///Height Offset.
///<para>When the item is serialized out as xml, its value is "hOff".</para>
///</summary>
[EnumString("hOff")]
HeightOffset,
///<summary>
///Left.
///<para>When the item is serialized out as xml, its value is "l".</para>
///</summary>
[EnumString("l")]
Left,
///<summary>
///Left Margin.
///<para>When the item is serialized out as xml, its value is "lMarg".</para>
///</summary>
[EnumString("lMarg")]
LeftMargin,
///<summary>
///Left Offset.
///<para>When the item is serialized out as xml, its value is "lOff".</para>
///</summary>
[EnumString("lOff")]
LeftOffset,
///<summary>
///Right.
///<para>When the item is serialized out as xml, its value is "r".</para>
///</summary>
[EnumString("r")]
Right,
///<summary>
///Right Margin.
///<para>When the item is serialized out as xml, its value is "rMarg".</para>
///</summary>
[EnumString("rMarg")]
RightMargin,
///<summary>
///Right Offset.
///<para>When the item is serialized out as xml, its value is "rOff".</para>
///</summary>
[EnumString("rOff")]
RightOffset,
///<summary>
///Primary Font Size.
///<para>When the item is serialized out as xml, its value is "primFontSz".</para>
///</summary>
[EnumString("primFontSz")]
PrimaryFontSize,
///<summary>
///Pyramid Accent Ratio.
///<para>When the item is serialized out as xml, its value is "pyraAcctRatio".</para>
///</summary>
[EnumString("pyraAcctRatio")]
PyramidAccentRatio,
///<summary>
///Secondary Font Size.
///<para>When the item is serialized out as xml, its value is "secFontSz".</para>
///</summary>
[EnumString("secFontSz")]
SecondaryFontSize,
///<summary>
///Sibling Spacing.
///<para>When the item is serialized out as xml, its value is "sibSp".</para>
///</summary>
[EnumString("sibSp")]
SiblingSpacing,
///<summary>
///Secondary Sibling Spacing.
///<para>When the item is serialized out as xml, its value is "secSibSp".</para>
///</summary>
[EnumString("secSibSp")]
SecondarySiblingSpacing,
///<summary>
///Spacing.
///<para>When the item is serialized out as xml, its value is "sp".</para>
///</summary>
[EnumString("sp")]
Spacing,
///<summary>
///Stem Thickness.
///<para>When the item is serialized out as xml, its value is "stemThick".</para>
///</summary>
[EnumString("stemThick")]
StemThickness,
///<summary>
///Top.
///<para>When the item is serialized out as xml, its value is "t".</para>
///</summary>
[EnumString("t")]
Top,
///<summary>
///Top Margin.
///<para>When the item is serialized out as xml, its value is "tMarg".</para>
///</summary>
[EnumString("tMarg")]
TopMargin,
///<summary>
///Top Offset.
///<para>When the item is serialized out as xml, its value is "tOff".</para>
///</summary>
[EnumString("tOff")]
TopOffset,
///<summary>
///User Defined A.
///<para>When the item is serialized out as xml, its value is "userA".</para>
///</summary>
[EnumString("userA")]
UserDefinedA,
///<summary>
///User Defined B.
///<para>When the item is serialized out as xml, its value is "userB".</para>
///</summary>
[EnumString("userB")]
UserDefinedB,
///<summary>
///User Defined C.
///<para>When the item is serialized out as xml, its value is "userC".</para>
///</summary>
[EnumString("userC")]
UserDefinedC,
///<summary>
///User Defined D.
///<para>When the item is serialized out as xml, its value is "userD".</para>
///</summary>
[EnumString("userD")]
UserDefinedD,
///<summary>
///User Defined E.
///<para>When the item is serialized out as xml, its value is "userE".</para>
///</summary>
[EnumString("userE")]
UserDefinedE,
///<summary>
///User Defined F.
///<para>When the item is serialized out as xml, its value is "userF".</para>
///</summary>
[EnumString("userF")]
UserDefinedF,
///<summary>
///User Defined G.
///<para>When the item is serialized out as xml, its value is "userG".</para>
///</summary>
[EnumString("userG")]
UserDefinedG,
///<summary>
///User Defined H.
///<para>When the item is serialized out as xml, its value is "userH".</para>
///</summary>
[EnumString("userH")]
UserDefinedH,
///<summary>
///User Defined I.
///<para>When the item is serialized out as xml, its value is "userI".</para>
///</summary>
[EnumString("userI")]
UserDefinedI,
///<summary>
///User Defined J.
///<para>When the item is serialized out as xml, its value is "userJ".</para>
///</summary>
[EnumString("userJ")]
UserDefinedJ,
///<summary>
///User Defined K.
///<para>When the item is serialized out as xml, its value is "userK".</para>
///</summary>
[EnumString("userK")]
UserDefinedK,
///<summary>
///User Defined L.
///<para>When the item is serialized out as xml, its value is "userL".</para>
///</summary>
[EnumString("userL")]
UserDefinedL,
///<summary>
///User Defined M.
///<para>When the item is serialized out as xml, its value is "userM".</para>
///</summary>
[EnumString("userM")]
UserDefinedM,
///<summary>
///User Defined N.
///<para>When the item is serialized out as xml, its value is "userN".</para>
///</summary>
[EnumString("userN")]
UserDefinedN,
///<summary>
///User Defined O.
///<para>When the item is serialized out as xml, its value is "userO".</para>
///</summary>
[EnumString("userO")]
UserDefinedO,
///<summary>
///User Defined P.
///<para>When the item is serialized out as xml, its value is "userP".</para>
///</summary>
[EnumString("userP")]
UserDefinedP,
///<summary>
///User Defined Q.
///<para>When the item is serialized out as xml, its value is "userQ".</para>
///</summary>
[EnumString("userQ")]
UserDefinedQ,
///<summary>
///User Defined R.
///<para>When the item is serialized out as xml, its value is "userR".</para>
///</summary>
[EnumString("userR")]
UserDefinedR,
///<summary>
///User Defined S.
///<para>When the item is serialized out as xml, its value is "userS".</para>
///</summary>
[EnumString("userS")]
UserDefinedS,
///<summary>
///User Defined T.
///<para>When the item is serialized out as xml, its value is "userT".</para>
///</summary>
[EnumString("userT")]
UserDefinedT,
///<summary>
///User Defined U.
///<para>When the item is serialized out as xml, its value is "userU".</para>
///</summary>
[EnumString("userU")]
UserDefinedU,
///<summary>
///User Defined V.
///<para>When the item is serialized out as xml, its value is "userV".</para>
///</summary>
[EnumString("userV")]
UserDefinedV,
///<summary>
///User Defined W.
///<para>When the item is serialized out as xml, its value is "userW".</para>
///</summary>
[EnumString("userW")]
UserDefinedW,
///<summary>
///User Defined X.
///<para>When the item is serialized out as xml, its value is "userX".</para>
///</summary>
[EnumString("userX")]
UserDefinedX,
///<summary>
///User Defined Y.
///<para>When the item is serialized out as xml, its value is "userY".</para>
///</summary>
[EnumString("userY")]
UserDefinedY,
///<summary>
///User Defined Z.
///<para>When the item is serialized out as xml, its value is "userZ".</para>
///</summary>
[EnumString("userZ")]
UserDefinedZ,
///<summary>
///Width.
///<para>When the item is serialized out as xml, its value is "w".</para>
///</summary>
[EnumString("w")]
Width,
///<summary>
///Arrowhead Width.
///<para>When the item is serialized out as xml, its value is "wArH".</para>
///</summary>
[EnumString("wArH")]
ArrowheadWidth,
///<summary>
///Width Offset.
///<para>When the item is serialized out as xml, its value is "wOff".</para>
///</summary>
[EnumString("wOff")]
WidthOffset,
}
/// <summary>
/// Constraint Relationship
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ConstraintRelationshipValues
{
///<summary>
///Self.
///<para>When the item is serialized out as xml, its value is "self".</para>
///</summary>
[EnumString("self")]
Self,
///<summary>
///Child.
///<para>When the item is serialized out as xml, its value is "ch".</para>
///</summary>
[EnumString("ch")]
Child,
///<summary>
///Descendant.
///<para>When the item is serialized out as xml, its value is "des".</para>
///</summary>
[EnumString("des")]
Descendant,
}
/// <summary>
/// Element Type
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ElementValues
{
///<summary>
///All.
///<para>When the item is serialized out as xml, its value is "all".</para>
///</summary>
[EnumString("all")]
All,
///<summary>
///Document.
///<para>When the item is serialized out as xml, its value is "doc".</para>
///</summary>
[EnumString("doc")]
Document,
///<summary>
///Node.
///<para>When the item is serialized out as xml, its value is "node".</para>
///</summary>
[EnumString("node")]
Node,
///<summary>
///Normal.
///<para>When the item is serialized out as xml, its value is "norm".</para>
///</summary>
[EnumString("norm")]
Normal,
///<summary>
///Non Normal.
///<para>When the item is serialized out as xml, its value is "nonNorm".</para>
///</summary>
[EnumString("nonNorm")]
NonNormal,
///<summary>
///Assistant.
///<para>When the item is serialized out as xml, its value is "asst".</para>
///</summary>
[EnumString("asst")]
Assistant,
///<summary>
///Non Assistant.
///<para>When the item is serialized out as xml, its value is "nonAsst".</para>
///</summary>
[EnumString("nonAsst")]
NonAssistant,
///<summary>
///Parent Transition.
///<para>When the item is serialized out as xml, its value is "parTrans".</para>
///</summary>
[EnumString("parTrans")]
ParentTransition,
///<summary>
///Presentation.
///<para>When the item is serialized out as xml, its value is "pres".</para>
///</summary>
[EnumString("pres")]
Presentation,
///<summary>
///Sibling Transition.
///<para>When the item is serialized out as xml, its value is "sibTrans".</para>
///</summary>
[EnumString("sibTrans")]
SiblingTransition,
}
/// <summary>
/// Parameter Identifier
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ParameterIdValues
{
///<summary>
///Horizontal Alignment.
///<para>When the item is serialized out as xml, its value is "horzAlign".</para>
///</summary>
[EnumString("horzAlign")]
HorizontalAlignment,
///<summary>
///Vertical Alignment.
///<para>When the item is serialized out as xml, its value is "vertAlign".</para>
///</summary>
[EnumString("vertAlign")]
VerticalAlignment,
///<summary>
///Child Direction.
///<para>When the item is serialized out as xml, its value is "chDir".</para>
///</summary>
[EnumString("chDir")]
ChildDirection,
///<summary>
///Child Alignment.
///<para>When the item is serialized out as xml, its value is "chAlign".</para>
///</summary>
[EnumString("chAlign")]
ChildAlignment,
///<summary>
///Secondary Child Alignment.
///<para>When the item is serialized out as xml, its value is "secChAlign".</para>
///</summary>
[EnumString("secChAlign")]
SecondaryChildAlignment,
///<summary>
///Linear Direction.
///<para>When the item is serialized out as xml, its value is "linDir".</para>
///</summary>
[EnumString("linDir")]
LinearDirection,
///<summary>
///Secondary Linear Direction.
///<para>When the item is serialized out as xml, its value is "secLinDir".</para>
///</summary>
[EnumString("secLinDir")]
SecondaryLinearDirection,
///<summary>
///Start Element.
///<para>When the item is serialized out as xml, its value is "stElem".</para>
///</summary>
[EnumString("stElem")]
StartElement,
///<summary>
///Bend Point.
///<para>When the item is serialized out as xml, its value is "bendPt".</para>
///</summary>
[EnumString("bendPt")]
BendPoint,
///<summary>
///Connection Route.
///<para>When the item is serialized out as xml, its value is "connRout".</para>
///</summary>
[EnumString("connRout")]
ConnectionRoute,
///<summary>
///Beginning Arrowhead Style.
///<para>When the item is serialized out as xml, its value is "begSty".</para>
///</summary>
[EnumString("begSty")]
BeginningArrowheadStyle,
///<summary>
///End Style.
///<para>When the item is serialized out as xml, its value is "endSty".</para>
///</summary>
[EnumString("endSty")]
EndStyle,
///<summary>
///Connector Dimension.
///<para>When the item is serialized out as xml, its value is "dim".</para>
///</summary>
[EnumString("dim")]
ConnectorDimension,
///<summary>
///Rotation Path.
///<para>When the item is serialized out as xml, its value is "rotPath".</para>
///</summary>
[EnumString("rotPath")]
RotationPath,
///<summary>
///Center Shape Mapping.
///<para>When the item is serialized out as xml, its value is "ctrShpMap".</para>
///</summary>
[EnumString("ctrShpMap")]
CenterShapeMapping,
///<summary>
///Node Horizontal Alignment.
///<para>When the item is serialized out as xml, its value is "nodeHorzAlign".</para>
///</summary>
[EnumString("nodeHorzAlign")]
NodeHorizontalAlignment,
///<summary>
///Node Vertical Alignment.
///<para>When the item is serialized out as xml, its value is "nodeVertAlign".</para>
///</summary>
[EnumString("nodeVertAlign")]
NodeVerticalAlignment,
///<summary>
///Fallback Scale.
///<para>When the item is serialized out as xml, its value is "fallback".</para>
///</summary>
[EnumString("fallback")]
FallbackScale,
///<summary>
///Text Direction.
///<para>When the item is serialized out as xml, its value is "txDir".</para>
///</summary>
[EnumString("txDir")]
TextDirection,
///<summary>
///Pyramid Accent Position.
///<para>When the item is serialized out as xml, its value is "pyraAcctPos".</para>
///</summary>
[EnumString("pyraAcctPos")]
PyramidAccentPosition,
///<summary>
///Pyramid Accent Text Margin.
///<para>When the item is serialized out as xml, its value is "pyraAcctTxMar".</para>
///</summary>
[EnumString("pyraAcctTxMar")]
PyramidAccentTextMargin,
///<summary>
///Text Block Direction.
///<para>When the item is serialized out as xml, its value is "txBlDir".</para>
///</summary>
[EnumString("txBlDir")]
TextBlockDirection,
///<summary>
///Text Anchor Horizontal.
///<para>When the item is serialized out as xml, its value is "txAnchorHorz".</para>
///</summary>
[EnumString("txAnchorHorz")]
TextAnchorHorizontal,
///<summary>
///Text Anchor Vertical.
///<para>When the item is serialized out as xml, its value is "txAnchorVert".</para>
///</summary>
[EnumString("txAnchorVert")]
TextAnchorVertical,
///<summary>
///Text Anchor Horizontal With Children.
///<para>When the item is serialized out as xml, its value is "txAnchorHorzCh".</para>
///</summary>
[EnumString("txAnchorHorzCh")]
TextAnchorHorizontalWithChildren,
///<summary>
///Text Anchor Vertical With Children.
///<para>When the item is serialized out as xml, its value is "txAnchorVertCh".</para>
///</summary>
[EnumString("txAnchorVertCh")]
TextAnchorVerticalWithChildren,
///<summary>
///Parent Text Left-to-Right Alignment.
///<para>When the item is serialized out as xml, its value is "parTxLTRAlign".</para>
///</summary>
[EnumString("parTxLTRAlign")]
ParentTextLeftToRightAlignment,
///<summary>
///Parent Text Right-to-Left Alignment.
///<para>When the item is serialized out as xml, its value is "parTxRTLAlign".</para>
///</summary>
[EnumString("parTxRTLAlign")]
ParentTextRightToLeftAlignment,
///<summary>
///Shape Text Left-to-Right Alignment.
///<para>When the item is serialized out as xml, its value is "shpTxLTRAlignCh".</para>
///</summary>
[EnumString("shpTxLTRAlignCh")]
ShapeTextLeftToRightAlignment,
///<summary>
///Shape Text Right-to-Left Alignment.
///<para>When the item is serialized out as xml, its value is "shpTxRTLAlignCh".</para>
///</summary>
[EnumString("shpTxRTLAlignCh")]
ShapeTextRightToLeftAlignment,
///<summary>
///Auto Text Rotation.
///<para>When the item is serialized out as xml, its value is "autoTxRot".</para>
///</summary>
[EnumString("autoTxRot")]
AutoTextRotation,
///<summary>
///Grow Direction.
///<para>When the item is serialized out as xml, its value is "grDir".</para>
///</summary>
[EnumString("grDir")]
GrowDirection,
///<summary>
///Flow Direction.
///<para>When the item is serialized out as xml, its value is "flowDir".</para>
///</summary>
[EnumString("flowDir")]
FlowDirection,
///<summary>
///Continue Direction.
///<para>When the item is serialized out as xml, its value is "contDir".</para>
///</summary>
[EnumString("contDir")]
ContinueDirection,
///<summary>
///Breakpoint.
///<para>When the item is serialized out as xml, its value is "bkpt".</para>
///</summary>
[EnumString("bkpt")]
Breakpoint,
///<summary>
///Offset.
///<para>When the item is serialized out as xml, its value is "off".</para>
///</summary>
[EnumString("off")]
Offset,
///<summary>
///Hierarchy Alignment.
///<para>When the item is serialized out as xml, its value is "hierAlign".</para>
///</summary>
[EnumString("hierAlign")]
HierarchyAlignment,
///<summary>
///Breakpoint Fixed Value.
///<para>When the item is serialized out as xml, its value is "bkPtFixedVal".</para>
///</summary>
[EnumString("bkPtFixedVal")]
BreakpointFixedValue,
///<summary>
///Start Bullets At Level.
///<para>When the item is serialized out as xml, its value is "stBulletLvl".</para>
///</summary>
[EnumString("stBulletLvl")]
StartBulletsAtLevel,
///<summary>
///Start Angle.
///<para>When the item is serialized out as xml, its value is "stAng".</para>
///</summary>
[EnumString("stAng")]
StartAngle,
///<summary>
///Span Angle.
///<para>When the item is serialized out as xml, its value is "spanAng".</para>
///</summary>
[EnumString("spanAng")]
SpanAngle,
///<summary>
///Aspect Ratio.
///<para>When the item is serialized out as xml, its value is "ar".</para>
///</summary>
[EnumString("ar")]
AspectRatio,
///<summary>
///Line Spacing Parent.
///<para>When the item is serialized out as xml, its value is "lnSpPar".</para>
///</summary>
[EnumString("lnSpPar")]
LineSpacingParent,
///<summary>
///Line Spacing After Parent Paragraph.
///<para>When the item is serialized out as xml, its value is "lnSpAfParP".</para>
///</summary>
[EnumString("lnSpAfParP")]
LineSpacingAfterParentParagraph,
///<summary>
///Line Spacing Children.
///<para>When the item is serialized out as xml, its value is "lnSpCh".</para>
///</summary>
[EnumString("lnSpCh")]
LineSpacingChildren,
///<summary>
///Line Spacing After Children Paragraph.
///<para>When the item is serialized out as xml, its value is "lnSpAfChP".</para>
///</summary>
[EnumString("lnSpAfChP")]
LineSpacingAfterChildrenParagraph,
///<summary>
///Route Shortest Distance.
///<para>When the item is serialized out as xml, its value is "rtShortDist".</para>
///</summary>
[EnumString("rtShortDist")]
RouteShortestDistance,
///<summary>
///Text Alignment.
///<para>When the item is serialized out as xml, its value is "alignTx".</para>
///</summary>
[EnumString("alignTx")]
TextAlignment,
///<summary>
///Pyramid Level Node.
///<para>When the item is serialized out as xml, its value is "pyraLvlNode".</para>
///</summary>
[EnumString("pyraLvlNode")]
PyramidLevelNode,
///<summary>
///Pyramid Accent Background Node.
///<para>When the item is serialized out as xml, its value is "pyraAcctBkgdNode".</para>
///</summary>
[EnumString("pyraAcctBkgdNode")]
PyramidAccentBackgroundNode,
///<summary>
///Pyramid Accent Text Node.
///<para>When the item is serialized out as xml, its value is "pyraAcctTxNode".</para>
///</summary>
[EnumString("pyraAcctTxNode")]
PyramidAccentTextNode,
///<summary>
///Source Node.
///<para>When the item is serialized out as xml, its value is "srcNode".</para>
///</summary>
[EnumString("srcNode")]
SourceNode,
///<summary>
///Destination Node.
///<para>When the item is serialized out as xml, its value is "dstNode".</para>
///</summary>
[EnumString("dstNode")]
DestinationNode,
///<summary>
///Beginning Points.
///<para>When the item is serialized out as xml, its value is "begPts".</para>
///</summary>
[EnumString("begPts")]
BeginningPoints,
///<summary>
///End Points.
///<para>When the item is serialized out as xml, its value is "endPts".</para>
///</summary>
[EnumString("endPts")]
EndPoints,
}
/// <summary>
/// Function Type
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum FunctionValues
{
///<summary>
///Count.
///<para>When the item is serialized out as xml, its value is "cnt".</para>
///</summary>
[EnumString("cnt")]
Count,
///<summary>
///Position.
///<para>When the item is serialized out as xml, its value is "pos".</para>
///</summary>
[EnumString("pos")]
Position,
///<summary>
///Reverse Position.
///<para>When the item is serialized out as xml, its value is "revPos".</para>
///</summary>
[EnumString("revPos")]
ReversePosition,
///<summary>
///Position Even.
///<para>When the item is serialized out as xml, its value is "posEven".</para>
///</summary>
[EnumString("posEven")]
PositionEven,
///<summary>
///Position Odd.
///<para>When the item is serialized out as xml, its value is "posOdd".</para>
///</summary>
[EnumString("posOdd")]
PositionOdd,
///<summary>
///Variable.
///<para>When the item is serialized out as xml, its value is "var".</para>
///</summary>
[EnumString("var")]
Variable,
///<summary>
///Depth.
///<para>When the item is serialized out as xml, its value is "depth".</para>
///</summary>
[EnumString("depth")]
Depth,
///<summary>
///Max Depth.
///<para>When the item is serialized out as xml, its value is "maxDepth".</para>
///</summary>
[EnumString("maxDepth")]
MaxDepth,
}
/// <summary>
/// Function Operator
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum FunctionOperatorValues
{
///<summary>
///Equal.
///<para>When the item is serialized out as xml, its value is "equ".</para>
///</summary>
[EnumString("equ")]
Equal,
///<summary>
///Not Equal To.
///<para>When the item is serialized out as xml, its value is "neq".</para>
///</summary>
[EnumString("neq")]
NotEqualTo,
///<summary>
///Greater Than.
///<para>When the item is serialized out as xml, its value is "gt".</para>
///</summary>
[EnumString("gt")]
GreaterThan,
///<summary>
///Less Than.
///<para>When the item is serialized out as xml, its value is "lt".</para>
///</summary>
[EnumString("lt")]
LessThan,
///<summary>
///Greater Than or Equal to.
///<para>When the item is serialized out as xml, its value is "gte".</para>
///</summary>
[EnumString("gte")]
GreaterThanOrEqualTo,
///<summary>
///Less Than or Equal to.
///<para>When the item is serialized out as xml, its value is "lte".</para>
///</summary>
[EnumString("lte")]
LessThanOrEqualTo,
}
/// <summary>
/// Horizontal Alignment
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum HorizontalAlignmentValues
{
///<summary>
///Left.
///<para>When the item is serialized out as xml, its value is "l".</para>
///</summary>
[EnumString("l")]
Left,
///<summary>
///Center.
///<para>When the item is serialized out as xml, its value is "ctr".</para>
///</summary>
[EnumString("ctr")]
Center,
///<summary>
///Right.
///<para>When the item is serialized out as xml, its value is "r".</para>
///</summary>
[EnumString("r")]
Right,
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
}
/// <summary>
/// Child Direction
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ChildDirectionValues
{
///<summary>
///Horizontal.
///<para>When the item is serialized out as xml, its value is "horz".</para>
///</summary>
[EnumString("horz")]
Horizontal,
///<summary>
///Vertical.
///<para>When the item is serialized out as xml, its value is "vert".</para>
///</summary>
[EnumString("vert")]
Vertical,
}
/// <summary>
/// Child Alignment
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ChildAlignmentValues
{
///<summary>
///Top.
///<para>When the item is serialized out as xml, its value is "t".</para>
///</summary>
[EnumString("t")]
Top,
///<summary>
///Bottom.
///<para>When the item is serialized out as xml, its value is "b".</para>
///</summary>
[EnumString("b")]
Bottom,
///<summary>
///Left.
///<para>When the item is serialized out as xml, its value is "l".</para>
///</summary>
[EnumString("l")]
Left,
///<summary>
///Right.
///<para>When the item is serialized out as xml, its value is "r".</para>
///</summary>
[EnumString("r")]
Right,
}
/// <summary>
/// Secondary Child Alignment
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum SecondaryChildAlignmentValues
{
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///Top.
///<para>When the item is serialized out as xml, its value is "t".</para>
///</summary>
[EnumString("t")]
Top,
///<summary>
///Bottom.
///<para>When the item is serialized out as xml, its value is "b".</para>
///</summary>
[EnumString("b")]
Bottom,
///<summary>
///Left.
///<para>When the item is serialized out as xml, its value is "l".</para>
///</summary>
[EnumString("l")]
Left,
///<summary>
///Right.
///<para>When the item is serialized out as xml, its value is "r".</para>
///</summary>
[EnumString("r")]
Right,
}
/// <summary>
/// Linear Direction
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum LinearDirectionValues
{
///<summary>
///From Left.
///<para>When the item is serialized out as xml, its value is "fromL".</para>
///</summary>
[EnumString("fromL")]
FromLeft,
///<summary>
///From Right.
///<para>When the item is serialized out as xml, its value is "fromR".</para>
///</summary>
[EnumString("fromR")]
FromRight,
///<summary>
///From Top.
///<para>When the item is serialized out as xml, its value is "fromT".</para>
///</summary>
[EnumString("fromT")]
FromTop,
///<summary>
///From Bottom.
///<para>When the item is serialized out as xml, its value is "fromB".</para>
///</summary>
[EnumString("fromB")]
FromBottom,
}
/// <summary>
/// Secondary Linear Direction
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum SecondaryLinearDirectionValues
{
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///From Left.
///<para>When the item is serialized out as xml, its value is "fromL".</para>
///</summary>
[EnumString("fromL")]
FromLeft,
///<summary>
///From Right.
///<para>When the item is serialized out as xml, its value is "fromR".</para>
///</summary>
[EnumString("fromR")]
FromRight,
///<summary>
///From Top.
///<para>When the item is serialized out as xml, its value is "fromT".</para>
///</summary>
[EnumString("fromT")]
FromTop,
///<summary>
///From Bottom.
///<para>When the item is serialized out as xml, its value is "fromB".</para>
///</summary>
[EnumString("fromB")]
FromBottom,
}
/// <summary>
/// Starting Element
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum StartingElementValues
{
///<summary>
///Node.
///<para>When the item is serialized out as xml, its value is "node".</para>
///</summary>
[EnumString("node")]
Node,
///<summary>
///Transition.
///<para>When the item is serialized out as xml, its value is "trans".</para>
///</summary>
[EnumString("trans")]
Transition,
}
/// <summary>
/// Rotation Path
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum RotationPathValues
{
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///Along Path.
///<para>When the item is serialized out as xml, its value is "alongPath".</para>
///</summary>
[EnumString("alongPath")]
AlongPath,
}
/// <summary>
/// Center Shape Mapping
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum CenterShapeMappingValues
{
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///First Node.
///<para>When the item is serialized out as xml, its value is "fNode".</para>
///</summary>
[EnumString("fNode")]
FirstNode,
}
/// <summary>
/// Bend Point
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum BendPointValues
{
///<summary>
///Beginning.
///<para>When the item is serialized out as xml, its value is "beg".</para>
///</summary>
[EnumString("beg")]
Beginning,
///<summary>
///Default.
///<para>When the item is serialized out as xml, its value is "def".</para>
///</summary>
[EnumString("def")]
Default,
///<summary>
///End.
///<para>When the item is serialized out as xml, its value is "end".</para>
///</summary>
[EnumString("end")]
End,
}
/// <summary>
/// Connector Routing
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ConnectorRoutingValues
{
///<summary>
///Straight.
///<para>When the item is serialized out as xml, its value is "stra".</para>
///</summary>
[EnumString("stra")]
Straight,
///<summary>
///Bending.
///<para>When the item is serialized out as xml, its value is "bend".</para>
///</summary>
[EnumString("bend")]
Bending,
///<summary>
///Curve.
///<para>When the item is serialized out as xml, its value is "curve".</para>
///</summary>
[EnumString("curve")]
Curve,
///<summary>
///Long Curve.
///<para>When the item is serialized out as xml, its value is "longCurve".</para>
///</summary>
[EnumString("longCurve")]
LongCurve,
}
/// <summary>
/// Arrowhead Styles
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ArrowheadStyleValues
{
///<summary>
///Auto.
///<para>When the item is serialized out as xml, its value is "auto".</para>
///</summary>
[EnumString("auto")]
Auto,
///<summary>
///Arrowhead Present.
///<para>When the item is serialized out as xml, its value is "arr".</para>
///</summary>
[EnumString("arr")]
Arrow,
///<summary>
///No Arrowhead.
///<para>When the item is serialized out as xml, its value is "noArr".</para>
///</summary>
[EnumString("noArr")]
NoArrow,
}
/// <summary>
/// Connector Dimension
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ConnectorDimensionValues
{
///<summary>
///1 Dimension.
///<para>When the item is serialized out as xml, its value is "1D".</para>
///</summary>
[EnumString("1D")]
OneDimension,
///<summary>
///2 Dimensions.
///<para>When the item is serialized out as xml, its value is "2D".</para>
///</summary>
[EnumString("2D")]
TwoDimension,
///<summary>
///Custom.
///<para>When the item is serialized out as xml, its value is "cust".</para>
///</summary>
[EnumString("cust")]
Custom,
}
/// <summary>
/// Connector Point
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ConnectorPointValues
{
///<summary>
///Auto.
///<para>When the item is serialized out as xml, its value is "auto".</para>
///</summary>
[EnumString("auto")]
Auto,
///<summary>
///Bottom Center.
///<para>When the item is serialized out as xml, its value is "bCtr".</para>
///</summary>
[EnumString("bCtr")]
BottomCenter,
///<summary>
///Center.
///<para>When the item is serialized out as xml, its value is "ctr".</para>
///</summary>
[EnumString("ctr")]
Center,
///<summary>
///Middle Left.
///<para>When the item is serialized out as xml, its value is "midL".</para>
///</summary>
[EnumString("midL")]
MiddleLeft,
///<summary>
///Middle Right.
///<para>When the item is serialized out as xml, its value is "midR".</para>
///</summary>
[EnumString("midR")]
MiddleRight,
///<summary>
///Top Center.
///<para>When the item is serialized out as xml, its value is "tCtr".</para>
///</summary>
[EnumString("tCtr")]
TopCenter,
///<summary>
///Bottom Left.
///<para>When the item is serialized out as xml, its value is "bL".</para>
///</summary>
[EnumString("bL")]
BottomLeft,
///<summary>
///Bottom Right.
///<para>When the item is serialized out as xml, its value is "bR".</para>
///</summary>
[EnumString("bR")]
BottomRight,
///<summary>
///Top Left.
///<para>When the item is serialized out as xml, its value is "tL".</para>
///</summary>
[EnumString("tL")]
TopLeft,
///<summary>
///Top Right.
///<para>When the item is serialized out as xml, its value is "tR".</para>
///</summary>
[EnumString("tR")]
TopRight,
///<summary>
///Radial.
///<para>When the item is serialized out as xml, its value is "radial".</para>
///</summary>
[EnumString("radial")]
Radial,
}
/// <summary>
/// Node Horizontal Alignment
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum NodeHorizontalAlignmentValues
{
///<summary>
///Left.
///<para>When the item is serialized out as xml, its value is "l".</para>
///</summary>
[EnumString("l")]
Left,
///<summary>
///Center.
///<para>When the item is serialized out as xml, its value is "ctr".</para>
///</summary>
[EnumString("ctr")]
Center,
///<summary>
///Right.
///<para>When the item is serialized out as xml, its value is "r".</para>
///</summary>
[EnumString("r")]
Right,
}
/// <summary>
/// Node Vertical Alignment
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum NodeVerticalAlignmentValues
{
///<summary>
///Top.
///<para>When the item is serialized out as xml, its value is "t".</para>
///</summary>
[EnumString("t")]
Top,
///<summary>
///Middle.
///<para>When the item is serialized out as xml, its value is "mid".</para>
///</summary>
[EnumString("mid")]
Middle,
///<summary>
///Bottom.
///<para>When the item is serialized out as xml, its value is "b".</para>
///</summary>
[EnumString("b")]
Bottom,
}
/// <summary>
/// Fallback Dimension
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum FallbackDimensionValues
{
///<summary>
///1 Dimension.
///<para>When the item is serialized out as xml, its value is "1D".</para>
///</summary>
[EnumString("1D")]
OneDimension,
///<summary>
///2 Dimensions.
///<para>When the item is serialized out as xml, its value is "2D".</para>
///</summary>
[EnumString("2D")]
TwoDimension,
}
/// <summary>
/// Text Direction
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum TextDirectionValues
{
///<summary>
///From Top.
///<para>When the item is serialized out as xml, its value is "fromT".</para>
///</summary>
[EnumString("fromT")]
FromTop,
///<summary>
///From Bottom.
///<para>When the item is serialized out as xml, its value is "fromB".</para>
///</summary>
[EnumString("fromB")]
FromBottom,
}
/// <summary>
/// Pyramid Accent Position
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum PyramidAccentPositionValues
{
///<summary>
///Before.
///<para>When the item is serialized out as xml, its value is "bef".</para>
///</summary>
[EnumString("bef")]
Before,
///<summary>
///Pyramid Accent After.
///<para>When the item is serialized out as xml, its value is "aft".</para>
///</summary>
[EnumString("aft")]
After,
}
/// <summary>
/// Pyramid Accent Text Margin
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum PyramidAccentTextMarginValues
{
///<summary>
///Step.
///<para>When the item is serialized out as xml, its value is "step".</para>
///</summary>
[EnumString("step")]
Step,
///<summary>
///Stack.
///<para>When the item is serialized out as xml, its value is "stack".</para>
///</summary>
[EnumString("stack")]
Stack,
}
/// <summary>
/// Text Block Direction
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum TextBlockDirectionValues
{
///<summary>
///Horizontal.
///<para>When the item is serialized out as xml, its value is "horz".</para>
///</summary>
[EnumString("horz")]
Horizontal,
///<summary>
///Vertical Direction.
///<para>When the item is serialized out as xml, its value is "vert".</para>
///</summary>
[EnumString("vert")]
Vertical,
}
/// <summary>
/// Text Anchor Horizontal
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum TextAnchorHorizontalValues
{
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///Center.
///<para>When the item is serialized out as xml, its value is "ctr".</para>
///</summary>
[EnumString("ctr")]
Center,
}
/// <summary>
/// Text Anchor Vertical
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum TextAnchorVerticalValues
{
///<summary>
///Top.
///<para>When the item is serialized out as xml, its value is "t".</para>
///</summary>
[EnumString("t")]
Top,
///<summary>
///Middle.
///<para>When the item is serialized out as xml, its value is "mid".</para>
///</summary>
[EnumString("mid")]
Middle,
///<summary>
///Bottom.
///<para>When the item is serialized out as xml, its value is "b".</para>
///</summary>
[EnumString("b")]
Bottom,
}
/// <summary>
/// Text Alignment
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum TextAlignmentValues
{
///<summary>
///Left.
///<para>When the item is serialized out as xml, its value is "l".</para>
///</summary>
[EnumString("l")]
Left,
///<summary>
///Center.
///<para>When the item is serialized out as xml, its value is "ctr".</para>
///</summary>
[EnumString("ctr")]
Center,
///<summary>
///Right.
///<para>When the item is serialized out as xml, its value is "r".</para>
///</summary>
[EnumString("r")]
Right,
}
/// <summary>
/// Auto Text Rotation
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum AutoTextRotationValues
{
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///Upright.
///<para>When the item is serialized out as xml, its value is "upr".</para>
///</summary>
[EnumString("upr")]
Upright,
///<summary>
///Gravity.
///<para>When the item is serialized out as xml, its value is "grav".</para>
///</summary>
[EnumString("grav")]
Gravity,
}
/// <summary>
/// Grow Direction
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum GrowDirectionValues
{
///<summary>
///Top Left.
///<para>When the item is serialized out as xml, its value is "tL".</para>
///</summary>
[EnumString("tL")]
TopLeft,
///<summary>
///Top Right.
///<para>When the item is serialized out as xml, its value is "tR".</para>
///</summary>
[EnumString("tR")]
TopRight,
///<summary>
///Bottom Left.
///<para>When the item is serialized out as xml, its value is "bL".</para>
///</summary>
[EnumString("bL")]
BottomLeft,
///<summary>
///Bottom Right.
///<para>When the item is serialized out as xml, its value is "bR".</para>
///</summary>
[EnumString("bR")]
BottomRight,
}
/// <summary>
/// Flow Direction
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum FlowDirectionValues
{
///<summary>
///Row.
///<para>When the item is serialized out as xml, its value is "row".</para>
///</summary>
[EnumString("row")]
Row,
///<summary>
///Column.
///<para>When the item is serialized out as xml, its value is "col".</para>
///</summary>
[EnumString("col")]
Column,
}
/// <summary>
/// Continue Direction
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum ContinueDirectionValues
{
///<summary>
///Reverse Direction.
///<para>When the item is serialized out as xml, its value is "revDir".</para>
///</summary>
[EnumString("revDir")]
ReverseDirection,
///<summary>
///Same Direction.
///<para>When the item is serialized out as xml, its value is "sameDir".</para>
///</summary>
[EnumString("sameDir")]
SameDirection,
}
/// <summary>
/// Breakpoint
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum BreakpointValues
{
///<summary>
///End of Canvas.
///<para>When the item is serialized out as xml, its value is "endCnv".</para>
///</summary>
[EnumString("endCnv")]
EndCanvas,
///<summary>
///Balanced.
///<para>When the item is serialized out as xml, its value is "bal".</para>
///</summary>
[EnumString("bal")]
Balanced,
///<summary>
///Fixed.
///<para>When the item is serialized out as xml, its value is "fixed".</para>
///</summary>
[EnumString("fixed")]
Fixed,
}
/// <summary>
/// Offset
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum OffsetValues
{
///<summary>
///Center.
///<para>When the item is serialized out as xml, its value is "ctr".</para>
///</summary>
[EnumString("ctr")]
Center,
///<summary>
///Offset.
///<para>When the item is serialized out as xml, its value is "off".</para>
///</summary>
[EnumString("off")]
Offset,
}
/// <summary>
/// Hierarchy Alignment
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum HierarchyAlignmentValues
{
///<summary>
///Top Left.
///<para>When the item is serialized out as xml, its value is "tL".</para>
///</summary>
[EnumString("tL")]
TopLeft,
///<summary>
///Top Right.
///<para>When the item is serialized out as xml, its value is "tR".</para>
///</summary>
[EnumString("tR")]
TopRight,
///<summary>
///Top Center Children.
///<para>When the item is serialized out as xml, its value is "tCtrCh".</para>
///</summary>
[EnumString("tCtrCh")]
TopCenterChildren,
///<summary>
///Top Center Descendants.
///<para>When the item is serialized out as xml, its value is "tCtrDes".</para>
///</summary>
[EnumString("tCtrDes")]
TopCenterDescendants,
///<summary>
///Bottom Left.
///<para>When the item is serialized out as xml, its value is "bL".</para>
///</summary>
[EnumString("bL")]
BottomLeft,
///<summary>
///Bottom Right.
///<para>When the item is serialized out as xml, its value is "bR".</para>
///</summary>
[EnumString("bR")]
BottomRight,
///<summary>
///Bottom Center Child.
///<para>When the item is serialized out as xml, its value is "bCtrCh".</para>
///</summary>
[EnumString("bCtrCh")]
BottomCenterChild,
///<summary>
///Bottom Center Descendant.
///<para>When the item is serialized out as xml, its value is "bCtrDes".</para>
///</summary>
[EnumString("bCtrDes")]
BottomCenterDescendant,
///<summary>
///Left Top.
///<para>When the item is serialized out as xml, its value is "lT".</para>
///</summary>
[EnumString("lT")]
LeftTop,
///<summary>
///Left Bottom.
///<para>When the item is serialized out as xml, its value is "lB".</para>
///</summary>
[EnumString("lB")]
LeftBottom,
///<summary>
///Left Center Child.
///<para>When the item is serialized out as xml, its value is "lCtrCh".</para>
///</summary>
[EnumString("lCtrCh")]
LeftCenterChild,
///<summary>
///Left Center Descendant.
///<para>When the item is serialized out as xml, its value is "lCtrDes".</para>
///</summary>
[EnumString("lCtrDes")]
LeftCenterDescendant,
///<summary>
///Right Top.
///<para>When the item is serialized out as xml, its value is "rT".</para>
///</summary>
[EnumString("rT")]
RightTop,
///<summary>
///Right Bottom.
///<para>When the item is serialized out as xml, its value is "rB".</para>
///</summary>
[EnumString("rB")]
RightBottom,
///<summary>
///Right Center Children.
///<para>When the item is serialized out as xml, its value is "rCtrCh".</para>
///</summary>
[EnumString("rCtrCh")]
RightCenterChildren,
///<summary>
///Right Center Descendants.
///<para>When the item is serialized out as xml, its value is "rCtrDes".</para>
///</summary>
[EnumString("rCtrDes")]
RightCenterDescendants,
}
/// <summary>
/// Variable Type
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum VariableValues
{
///<summary>
///Unknown.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///Organizational Chart Algorithm.
///<para>When the item is serialized out as xml, its value is "orgChart".</para>
///</summary>
[EnumString("orgChart")]
OrganizationalChart,
///<summary>
///Child Max.
///<para>When the item is serialized out as xml, its value is "chMax".</para>
///</summary>
[EnumString("chMax")]
ChildMax,
///<summary>
///Child Preference.
///<para>When the item is serialized out as xml, its value is "chPref".</para>
///</summary>
[EnumString("chPref")]
ChildPreference,
///<summary>
///Bullets Enabled.
///<para>When the item is serialized out as xml, its value is "bulEnabled".</para>
///</summary>
[EnumString("bulEnabled")]
BulletsEnabled,
///<summary>
///Direction.
///<para>When the item is serialized out as xml, its value is "dir".</para>
///</summary>
[EnumString("dir")]
Direction,
///<summary>
///Hierarchy Branch.
///<para>When the item is serialized out as xml, its value is "hierBranch".</para>
///</summary>
[EnumString("hierBranch")]
HierarchyBranch,
///<summary>
///Animate One.
///<para>When the item is serialized out as xml, its value is "animOne".</para>
///</summary>
[EnumString("animOne")]
AnimateOne,
///<summary>
///Animation Level.
///<para>When the item is serialized out as xml, its value is "animLvl".</para>
///</summary>
[EnumString("animLvl")]
AnimationLevel,
///<summary>
///Resize Handles.
///<para>When the item is serialized out as xml, its value is "resizeHandles".</para>
///</summary>
[EnumString("resizeHandles")]
ResizeHandles,
}
/// <summary>
/// Output Shape Type
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum OutputShapeValues
{
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///Connection.
///<para>When the item is serialized out as xml, its value is "conn".</para>
///</summary>
[EnumString("conn")]
Connection,
}
/// <summary>
/// Vertical Alignment
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("DomGen", "2.0")]
public enum VerticalAlignmentValues
{
///<summary>
///Top.
///<para>When the item is serialized out as xml, its value is "t".</para>
///</summary>
[EnumString("t")]
Top,
///<summary>
///Middle.
///<para>When the item is serialized out as xml, its value is "mid".</para>
///</summary>
[EnumString("mid")]
Middle,
///<summary>
///Bottom.
///<para>When the item is serialized out as xml, its value is "b".</para>
///</summary>
[EnumString("b")]
Bottom,
///<summary>
///None.
///<para>When the item is serialized out as xml, its value is "none".</para>
///</summary>
[EnumString("none")]
None,
///<summary>
///top.
///<para>When the item is serialized out as xml, its value is "top".</para>
///</summary>
[EnumString("top")]
Top2010,
///<summary>
///center.
///<para>When the item is serialized out as xml, its value is "center".</para>
///</summary>
[EnumString("center")]
Middle2010,
///<summary>
///bottom.
///<para>When the item is serialized out as xml, its value is "bottom".</para>
///</summary>
[EnumString("bottom")]
Bottom2010,
}
}
| 29.63202 | 423 | 0.639234 | [
"Apache-2.0"
] | Aliceljm1/openxml | DocumentFormat.OpenXml/src/GeneratedCode/schemas_openxmlformats_org_drawingml_2006_diagram.cs | 477,522 | C# |
using System;
namespace SKIT.FlurlHttpClient.Wechat.OpenAI
{
/// <summary>
/// <para>微信智能对话第三方接入 API 接口域名。</para>
/// </summary>
public static class WechatOpenAIThirdPartyEndpoints
{
/// <summary>
/// 主域名(默认)。
/// </summary>
public const string DEFAULT = "https://openaiapi.weixin.qq.com";
}
}
| 22 | 72 | 0.588068 | [
"MIT"
] | ZUOXIANGE/DotNetCore.SKIT.FlurlHttpClient.Wechat | src/SKIT.FlurlHttpClient.Wechat.OpenAI/WechatOpenAIThirdPartyEndpoints.cs | 402 | C# |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
using System.Collections.Generic;
using Aliyun.Acs.Core;
using Aliyun.Acs.Core.Http;
using Aliyun.Acs.Core.Transform;
using Aliyun.Acs.Core.Utils;
using Aliyun.Acs.Green.Transform;
using Aliyun.Acs.Green.Transform.V20180509;
namespace Aliyun.Acs.Green.Model.V20180509
{
public class DeletePersonRequest : RoaAcsRequest<DeletePersonResponse>
{
public DeletePersonRequest()
: base("Green", "2018-05-09", "DeletePerson", "green", "openAPI")
{
if (this.GetType().GetProperty("ProductEndpointMap") != null && this.GetType().GetProperty("ProductEndpointType") != null)
{
this.GetType().GetProperty("ProductEndpointMap").SetValue(this, Endpoint.endpointMap, null);
this.GetType().GetProperty("ProductEndpointType").SetValue(this, Endpoint.endpointRegionalType, null);
}
UriPattern = "/green/sface/person/delete";
Method = MethodType.POST;
}
private string clientInfo;
public string ClientInfo
{
get
{
return clientInfo;
}
set
{
clientInfo = value;
DictionaryUtil.Add(QueryParameters, "ClientInfo", value);
}
}
public override DeletePersonResponse GetResponse(UnmarshallerContext unmarshallerContext)
{
return DeletePersonResponseUnmarshaller.Unmarshall(unmarshallerContext);
}
}
}
| 33.892308 | 134 | 0.698593 | [
"Apache-2.0"
] | bitType/aliyun-openapi-net-sdk | aliyun-net-sdk-green/Green/Model/V20180509/DeletePersonRequest.cs | 2,203 | C# |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the firehose-2015-08-04.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.KinesisFirehose.Model
{
/// <summary>
/// Configures retry behavior in case Kinesis Data Firehose is unable to deliver documents
/// to Amazon Redshift.
/// </summary>
public partial class RedshiftRetryOptions
{
private int? _durationInSeconds;
/// <summary>
/// Gets and sets the property DurationInSeconds.
/// <para>
/// The length of time during which Kinesis Data Firehose retries delivery after a failure,
/// starting from the initial request and including the first attempt. The default value
/// is 3600 seconds (60 minutes). Kinesis Data Firehose does not retry if the value of
/// <code>DurationInSeconds</code> is 0 (zero) or if the first delivery attempt takes
/// longer than the current value.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=7200)]
public int DurationInSeconds
{
get { return this._durationInSeconds.GetValueOrDefault(); }
set { this._durationInSeconds = value; }
}
// Check to see if DurationInSeconds property is set
internal bool IsSetDurationInSeconds()
{
return this._durationInSeconds.HasValue;
}
}
} | 35.285714 | 107 | 0.65632 | [
"Apache-2.0"
] | philasmar/aws-sdk-net | sdk/src/Services/KinesisFirehose/Generated/Model/RedshiftRetryOptions.cs | 2,223 | C# |
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
namespace BlankApp.Desktop
{
/// <summary>
/// This is the main type for your game.
/// </summary>
public class Game1 : Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
}
/// <summary>
/// Allows the game to perform any initialization it needs to before starting to run.
/// This is where it can query for any required services and load any non-graphic
/// related content. Calling base.Initialize will enumerate through any components
/// and initialize them as well.
/// </summary>
protected override void Initialize()
{
// TODO: Add your initialization logic here
base.Initialize();
}
/// <summary>
/// LoadContent will be called once per game and is the place to load
/// all of your content.
/// </summary>
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
// TODO: use this.Content to load your game content here
}
/// <summary>
/// UnloadContent will be called once per game and is the place to unload
/// game-specific content.
/// </summary>
protected override void UnloadContent()
{
// TODO: Unload any non ContentManager content here
}
/// <summary>
/// Allows the game to run logic such as updating the world,
/// checking for collisions, gathering input, and playing audio.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
// TODO: Add your update logic here
base.Update(gameTime);
}
/// <summary>
/// This is called when the game should draw itself.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
// TODO: Add your drawing code here
base.Draw(gameTime);
}
}
}
| 32.440476 | 132 | 0.58789 | [
"MIT"
] | Adrriii/MonoGame | ProjectTemplates/DotNetTemplate/MonoGame.Templates.CSharp/content/BlankApp.DesktopGL/Game1.cs | 2,727 | C# |
using FluentAssertions;
using GitLabApiClient.Internal.Queries;
using GitLabApiClient.Models.Groups.Requests;
using Xunit;
namespace GitLabApiClient.Test.Internal.Queries
{
public class GroupsQueryBuilderTest
{
[Fact]
public void NonDefaultQueryBuilt()
{
var sut = new GroupsQueryBuilder();
string query = sut.Build(
"https://gitlab.com/api/v4/groups",
new GroupsQueryOptions
{
SkipGroups = new[] { 1, 2 },
AllAvailable = true,
Search = "filter",
Order = GroupsOrder.Path,
Sort = GroupsSort.Descending,
Statistics = true,
Owned = true
});
query.Should().Be("https://gitlab.com/api/v4/groups?" +
"skip_groups%5b%5d=1&skip_groups%5b%5d=2&" +
"all_available=true&" +
"search=filter&" +
"order_by=path&" +
"sort=desc&" +
"statistics=true&" +
"owned=true");
}
}
}
| 32.230769 | 74 | 0.445505 | [
"MIT"
] | 0x4D616E75/GitLabApiClient | test/GitLabApiClient.Test/Internal/Queries/GroupsQueryBuilderTest.cs | 1,259 | C# |
// Copyright (c) 2013-2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
//
// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
using System;
using System.Diagnostics;
using Crow;
namespace CrowEditBase
{
[DebuggerDisplay("{" + nameof(GetDebuggerDisplay) + "(),nq}")]
public abstract class Watch : CrowEditComponent {
Debugger dbg;
bool isExpanded;
string name;
string expression;
string value;
bool isEditable;
int numChild;
string type;
int threadId;
ObservableList<Watch> children = new ObservableList<Watch>();
public CommandGroup Commands => new CommandGroup (
new ActionCommand ("Update Value", () => UpdateValue()),
new ActionCommand ("Delete", () => Delete())
);
public bool HasChildren => NumChild > 0;
public bool IsExpanded {
get => isExpanded;
set {
if (isExpanded == value)
return;
isExpanded = value;
NotifyValueChanged(isExpanded);
if (isExpanded)
onExpand();
}
}
protected abstract void onExpand();
public ObservableList<Watch> Children {
get => children;
set {
if (children == value)
return;
children = value;
NotifyValueChanged (children);
}
}
public string Name {
get => name;
set {
if (name == value)
return;
name = value;
NotifyValueChanged(name);
}
}
public string Expression {
get => expression;
set {
if (expression == value)
return;
expression = value;
NotifyValueChanged(expression);
}
}
public string Value {
get => value;
set {
if (this.value == value)
return;
this.value = value;
NotifyValueChanged(this.value);
}
}
public bool IsEditable {
get => isEditable;
set {
if (isEditable == value)
return;
isEditable = value;
NotifyValueChanged(isEditable);
}
}
public int NumChild {
get => numChild;
set {
if (numChild == value)
return;
numChild = value;
NotifyValueChanged(numChild);
NotifyValueChanged ("HasChildren", HasChildren);
}
}
public string Type {
get => type;
set {
if (type == value)
return;
type = value;
NotifyValueChanged(type);
}
}
public int ThreadId {
get => threadId;
set {
if (threadId == value)
return;
threadId = value;
NotifyValueChanged(threadId);
}
}
public abstract void Create();
public abstract void Delete();
public abstract void UpdateValue ();
public override string ToString() => $"{Name}:{Expression} = {Value} [{Type}]";
string GetDebuggerDisplay() => ToString();
}
}
| 20.248062 | 89 | 0.630934 | [
"MIT"
] | jpbruyere/CrowEd | CrowEditBase/src/Debug/Watch.cs | 2,615 | C# |
namespace WATF.Compiler
{
public struct GlobalDefine
{
public struct Keyword
{
public struct Executive
{
public const string Root = "Executive";
public const string Import = "Import";
public const string Package = "Package";
public const string Path = "PATH";
public const string Prefix = "PREFIX";
public const string Namespace = "NAMESPACE";
public const string Test = "Test";
public const string Step = "Step";
public const string Var = "Var";
public const string Name = "NAME";
public const string Value = "VALUE";
public const string Action = "Action";
public const string Select = "SELECT";
public const string Into = "INTO";
public const string From = "FROM";
public const string Where = "WHERE";
public const string Compare = "COMPARE";
public const string True = "TRUE";
public const string False = "FALSE";
public const string Set = "SET";
public const string Print = "PRINT";
}
public struct ConfigFile
{
public const string Root = "ConfigFile";
public const string Load = "Load";
public const string Name = "NAME";
public const string Path = "PATH";
}
}
}
} | 37.595238 | 60 | 0.49715 | [
"BSD-3-Clause"
] | huangchaosuper/watf | WATF.Compiler/GlobalDefine.cs | 1,579 | C# |
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class Pinball : ModuleRules
{
public Pinball(ReadOnlyTargetRules Target)
: base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore"}
);
PrivateDependencyModuleNames.AddRange(
new string[] {
"RenderCore",
"Slate",
"SlateCore",
"Paper2D",
}
);
}
}
| 19.32 | 99 | 0.695652 | [
"MIT"
] | TheHoodieGuy02/pinball-construction-kit | Source/Pinball/Pinball.Build.cs | 483 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Layout_Canvas
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private Random randomNumber = new Random(Guid.NewGuid().GetHashCode());
private enum enumShapeType { ELLIPSE, RECTANGLE };
public MainWindow()
{
InitializeComponent();
this.ResizeMode = ResizeMode.NoResize;
}
private void SetRandomShapes(Canvas e, enumShapeType t, int number)
{
double canvasHeight = e.ActualHeight;
double canvasWidth = e.ActualWidth;
Shape shape = new Ellipse();
for (int count=0; count< number; count++)
{
switch (t)
{
case enumShapeType.ELLIPSE:
shape = new Ellipse();
break;
case enumShapeType.RECTANGLE:
shape = new Rectangle();
break;
}
shape.Height = randomNumber.Next(10,25);
shape.Width = shape.Height;
SolidColorBrush mySolidColorBrush = new SolidColorBrush();
// Describes the brush's color using RGB values.
// Each value has a range of 0-255.
mySolidColorBrush.Color = Color.FromArgb(255, (byte)randomNumber.Next(0,255), (byte)randomNumber.Next(0, 255), (byte)randomNumber.Next(0, 255));
shape.Fill = mySolidColorBrush;
e.Children.Add(shape);
Canvas.SetLeft(shape, randomNumber.Next(0,(int)(canvasWidth-shape.Width)));
Canvas.SetTop(shape, randomNumber.Next(0,(int)(canvasHeight-shape.Height)));
}
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
SetRandomShapes(TopCanvas, enumShapeType.ELLIPSE, 25);
SetRandomShapes(BottomCanvas, enumShapeType.RECTANGLE, 25);
}
private void RestartButton_Click(object sender, RoutedEventArgs e)
{
TopCanvas.Children.Clear();
BottomCanvas.Children.Clear();
SetRandomShapes(TopCanvas, enumShapeType.ELLIPSE, int.Parse(NumShapes.Text));
SetRandomShapes(BottomCanvas, enumShapeType.RECTANGLE, int.Parse(NumShapes.Text));
}
}
}
| 34.012195 | 160 | 0.598422 | [
"Unlicense"
] | luciochen233/CSE483-code | repo/Layout_Canvas/MainWindow.xaml.cs | 2,791 | C# |
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace Gov.Jag.Embc.Interfaces.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq; using System.ComponentModel.DataAnnotations.Schema;
/// <summary>
/// DependentOptionMetadataCollection
/// </summary>
public partial class MicrosoftDynamicsCRMDependentOptionMetadataCollection
{
/// <summary>
/// Initializes a new instance of the
/// MicrosoftDynamicsCRMDependentOptionMetadataCollection class.
/// </summary>
public MicrosoftDynamicsCRMDependentOptionMetadataCollection()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the
/// MicrosoftDynamicsCRMDependentOptionMetadataCollection class.
/// </summary>
public MicrosoftDynamicsCRMDependentOptionMetadataCollection(IList<MicrosoftDynamicsCRMDependentOptionMetadata> optionList = default(IList<MicrosoftDynamicsCRMDependentOptionMetadata>))
{
OptionList = optionList;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// </summary>
[JsonProperty(PropertyName = "OptionList")]
[NotMapped] public IList<MicrosoftDynamicsCRMDependentOptionMetadata> OptionList { get; set; }
}
}
| 33.46 | 193 | 0.672445 | [
"Apache-2.0"
] | CodingVelocista/embc-ess | embc-interfaces/Dynamics-Autorest/Models/MicrosoftDynamicsCRMDependentOptionMetadataCollection.cs | 1,673 | C# |
using System;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace Grains.Utility
{
//
// http://stackoverflow.com/questions/2642141/how-to-create-deterministic-guids
//
public static class GuidUtility
{
/// <summary>
/// Creates a name-based UUID using the algorithm from RFC 4122 §4.3.
/// </summary>
/// <param name="namespaceId">The ID of the namespace.</param>
/// <param name="name">The name (within that namespace).</param>
/// <returns>A UUID derived from the namespace and name.</returns>
/// <remarks>See <a href="http://code.logos.com/blog/2011/04/generating_a_deterministic_guid.html">Generating a deterministic GUID</a>.</remarks>
public static Guid Create(Guid namespaceId, string name)
{
return Create(namespaceId, name, 5);
}
/// <summary>
/// Creates a name-based UUID using the algorithm from RFC 4122 §4.3.
/// </summary>
/// <param name="namespaceId">The ID of the namespace.</param>
/// <param name="name">The name (within that namespace).</param>
/// <param name="version">The version number of the UUID to create; this value must be either
/// 3 (for MD5 hashing) or 5 (for SHA-1 hashing).</param>
/// <returns>A UUID derived from the namespace and name.</returns>
/// <remarks>See <a href="http://code.logos.com/blog/2011/04/generating_a_deterministic_guid.html">Generating a deterministic GUID</a>.</remarks>
public static Guid Create(Guid namespaceId, string name, int version)
{
if (name == null)
throw new ArgumentNullException("name");
if (version != 3 && version != 5)
throw new ArgumentOutOfRangeException("version", "version must be either 3 or 5.");
// convert the name to a sequence of octets (as defined by the standard or conventions of its namespace) (step 3)
// ASSUME: UTF-8 encoding is always appropriate
byte[] nameBytes = Encoding.UTF8.GetBytes(name);
// convert the namespace UUID to network order (step 3)
byte[] namespaceBytes = namespaceId.ToByteArray();
SwapByteOrder(namespaceBytes);
// comput the hash of the name space ID concatenated with the name (step 4)
byte[] hash;
using (HashAlgorithm algorithm = version == 3 ? (HashAlgorithm)MD5.Create() : SHA1.Create())
{
//algorithm.TransformBlock(namespaceBytes, 0, namespaceBytes.Length, null, 0);
//algorithm.TransformFinalBlock(nameBytes, 0, nameBytes.Length);
//hash = algorithm.Hash;
algorithm.Initialize();
byte[] rv = new byte[namespaceBytes.Length + nameBytes.Length];
Buffer.BlockCopy(namespaceBytes, 0, rv, 0, namespaceBytes.Length);
Buffer.BlockCopy(nameBytes, 0, rv, namespaceBytes.Length, nameBytes.Length);
hash = algorithm.ComputeHash(rv);
}
// most bytes from the hash are copied straight to the bytes of the new GUID (steps 5-7, 9, 11-12)
byte[] newGuid = new byte[16];
Array.Copy(hash, 0, newGuid, 0, 16);
// set the four most significant bits (bits 12 through 15) of the time_hi_and_version field to the appropriate 4-bit version number from Section 4.1.3 (step 8)
newGuid[6] = (byte)((newGuid[6] & 0x0F) | (version << 4));
// set the two most significant bits (bits 6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively (step 10)
newGuid[8] = (byte)((newGuid[8] & 0x3F) | 0x80);
// convert the resulting UUID to local byte order (step 13)
SwapByteOrder(newGuid);
return new Guid(newGuid);
}
/// <summary>
/// The namespace for fully-qualified domain names (from RFC 4122, Appendix C).
/// </summary>
public static readonly Guid DnsNamespace = new Guid("6ba7b810-9dad-11d1-80b4-00c04fd430c8");
/// <summary>
/// The namespace for URLs (from RFC 4122, Appendix C).
/// </summary>
public static readonly Guid UrlNamespace = new Guid("6ba7b811-9dad-11d1-80b4-00c04fd430c8");
/// <summary>
/// The namespace for ISO OIDs (from RFC 4122, Appendix C).
/// </summary>
public static readonly Guid IsoOidNamespace = new Guid("6ba7b812-9dad-11d1-80b4-00c04fd430c8");
// Converts a GUID (expressed as a byte array) to/from network order (MSB-first).
internal static void SwapByteOrder(byte[] guid)
{
SwapBytes(guid, 0, 3);
SwapBytes(guid, 1, 2);
SwapBytes(guid, 4, 5);
SwapBytes(guid, 6, 7);
}
private static void SwapBytes(byte[] guid, int left, int right)
{
byte temp = guid[left];
guid[left] = guid[right];
guid[right] = temp;
}
}
}
| 46.254545 | 171 | 0.603184 | [
"MIT"
] | Maarten88/rrod | src/Grains/Utility/GuidUtility.cs | 5,092 | C# |
using System ;
using JetBrains.Annotations ;
namespace Idasen.BluetoothLE.Linak.Interfaces
{
public interface IDeskDetector
: IDisposable
{
/// <summary>
/// Notifies when a desk was detected.
/// </summary>
IObservable < IDesk > DeskDetected { get ; }
/// <summary>
/// Initializes the instance with the given parameters.
/// </summary>
/// <param name="deviceName">
/// The device name to detect.
/// </param>
/// <param name="deviceAddress">
/// The device address to detect.
/// </param>
/// <param name="deviceTimeout">
/// The timeout used for monitored devices after a device expires
/// and is removed from the cache.
/// </param>
void Initialize ( [ NotNull ] string deviceName ,
ulong deviceAddress ,
uint deviceTimeout ) ;
/// <summary>
/// Start the detection of a desk by device name or device address.
/// </summary>
void Start ( ) ;
/// <summary>
/// Stop the detection of a desk.
/// </summary>
void Stop ( ) ;
}
} | 31.073171 | 79 | 0.5 | [
"MIT"
] | 7orlum/idasen-desk | src/Idasen.BluetoothLE.Linak/Interfaces/IDeskDetector.cs | 1,276 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Problem 20. Palindromes")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Problem 20. Palindromes")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("d7af4369-ffa3-4fdd-b564-9fb560ab21a0")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 39.324324 | 85 | 0.72646 | [
"MIT"
] | Telerik-Homework-ValentinRangelov/Homework | C#/C# 2/Homework Strings and Text Processing/Problem 20. Palindromes/Properties/AssemblyInfo.cs | 1,458 | C# |
// ------------------------------------------------------------------------------
// <auto-generated>
// Generated by Xsd2Code. Version 3.4.0.18239 Microsoft Reciprocal License (Ms-RL)
// <NameSpace>Mim.V4200</NameSpace><Collection>Array</Collection><codeType>CSharp</codeType><EnableDataBinding>False</EnableDataBinding><EnableLazyLoading>False</EnableLazyLoading><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>True</EnableSummaryComment><VirtualProp>False</VirtualProp><IncludeSerializeMethod>True</IncludeSerializeMethod><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><GenerateCloneMethod>True</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><CodeBaseTag>Net35</CodeBaseTag><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><GenerateXMLAttributes>True</GenerateXMLAttributes><OrderXMLAttrib>False</OrderXMLAttrib><EnableEncoding>False</EnableEncoding><AutomaticProperties>False</AutomaticProperties><GenerateShouldSerialize>False</GenerateShouldSerialize><DisableDebug>False</DisableDebug><PropNameSpecified>Default</PropNameSpecified><Encoder>UTF8</Encoder><CustomUsings></CustomUsings><ExcludeIncludedTypes>True</ExcludeIncludedTypes><EnableInitializeFields>False</EnableInitializeFields>
// </auto-generated>
// ------------------------------------------------------------------------------
namespace Mim.V4200 {
using System;
using System.Diagnostics;
using System.Xml.Serialization;
using System.Collections;
using System.Xml.Schema;
using System.ComponentModel;
using System.IO;
using System.Text;
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xsd2Code", "3.4.0.18239")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(TypeName="COCT_MT050012UK04.Patient", Namespace="urn:hl7-org:v3")]
public partial class COCT_MT050012UK04Patient {
private II idField;
private CS codeField;
private AD[] addrField;
private TEL[] telecomField;
private ST certificateTextField;
private CS confidentialityCodeField;
private COCT_MT050012UK04Person patientPersonField;
private COCT_MT050012UK04SourceOf sourceOfField;
private string typeField;
private string classCodeField;
private string[] typeIDField;
private string[] realmCodeField;
private string nullFlavorField;
private static System.Xml.Serialization.XmlSerializer serializer;
public COCT_MT050012UK04Patient() {
this.typeField = "Patient";
this.classCodeField = "PAT";
}
public II id {
get {
return this.idField;
}
set {
this.idField = value;
}
}
public CS code {
get {
return this.codeField;
}
set {
this.codeField = value;
}
}
[System.Xml.Serialization.XmlElementAttribute("addr")]
public AD[] addr {
get {
return this.addrField;
}
set {
this.addrField = value;
}
}
[System.Xml.Serialization.XmlElementAttribute("telecom")]
public TEL[] telecom {
get {
return this.telecomField;
}
set {
this.telecomField = value;
}
}
public ST certificateText {
get {
return this.certificateTextField;
}
set {
this.certificateTextField = value;
}
}
public CS confidentialityCode {
get {
return this.confidentialityCodeField;
}
set {
this.confidentialityCodeField = value;
}
}
public COCT_MT050012UK04Person patientPerson {
get {
return this.patientPersonField;
}
set {
this.patientPersonField = value;
}
}
public COCT_MT050012UK04SourceOf sourceOf {
get {
return this.sourceOfField;
}
set {
this.sourceOfField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute(DataType="token")]
public string type {
get {
return this.typeField;
}
set {
this.typeField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public string classCode {
get {
return this.classCodeField;
}
set {
this.classCodeField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute()]
public string[] typeID {
get {
return this.typeIDField;
}
set {
this.typeIDField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute(DataType="token")]
public string[] realmCode {
get {
return this.realmCodeField;
}
set {
this.realmCodeField = value;
}
}
[System.Xml.Serialization.XmlAttributeAttribute(DataType="token")]
public string nullFlavor {
get {
return this.nullFlavorField;
}
set {
this.nullFlavorField = value;
}
}
private static System.Xml.Serialization.XmlSerializer Serializer {
get {
if ((serializer == null)) {
serializer = new System.Xml.Serialization.XmlSerializer(typeof(COCT_MT050012UK04Patient));
}
return serializer;
}
}
#region Serialize/Deserialize
/// <summary>
/// Serializes current COCT_MT050012UK04Patient object into an XML document
/// </summary>
/// <returns>string XML value</returns>
public virtual string Serialize() {
System.IO.StreamReader streamReader = null;
System.IO.MemoryStream memoryStream = null;
try {
memoryStream = new System.IO.MemoryStream();
Serializer.Serialize(memoryStream, this);
memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
streamReader = new System.IO.StreamReader(memoryStream);
return streamReader.ReadToEnd();
}
finally {
if ((streamReader != null)) {
streamReader.Dispose();
}
if ((memoryStream != null)) {
memoryStream.Dispose();
}
}
}
/// <summary>
/// Deserializes workflow markup into an COCT_MT050012UK04Patient object
/// </summary>
/// <param name="xml">string workflow markup to deserialize</param>
/// <param name="obj">Output COCT_MT050012UK04Patient object</param>
/// <param name="exception">output Exception value if deserialize failed</param>
/// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
public static bool Deserialize(string xml, out COCT_MT050012UK04Patient obj, out System.Exception exception) {
exception = null;
obj = default(COCT_MT050012UK04Patient);
try {
obj = Deserialize(xml);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool Deserialize(string xml, out COCT_MT050012UK04Patient obj) {
System.Exception exception = null;
return Deserialize(xml, out obj, out exception);
}
public static COCT_MT050012UK04Patient Deserialize(string xml) {
System.IO.StringReader stringReader = null;
try {
stringReader = new System.IO.StringReader(xml);
return ((COCT_MT050012UK04Patient)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
}
finally {
if ((stringReader != null)) {
stringReader.Dispose();
}
}
}
/// <summary>
/// Serializes current COCT_MT050012UK04Patient object into file
/// </summary>
/// <param name="fileName">full path of outupt xml file</param>
/// <param name="exception">output Exception value if failed</param>
/// <returns>true if can serialize and save into file; otherwise, false</returns>
public virtual bool SaveToFile(string fileName, out System.Exception exception) {
exception = null;
try {
SaveToFile(fileName);
return true;
}
catch (System.Exception e) {
exception = e;
return false;
}
}
public virtual void SaveToFile(string fileName) {
System.IO.StreamWriter streamWriter = null;
try {
string xmlString = Serialize();
System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
streamWriter = xmlFile.CreateText();
streamWriter.WriteLine(xmlString);
streamWriter.Close();
}
finally {
if ((streamWriter != null)) {
streamWriter.Dispose();
}
}
}
/// <summary>
/// Deserializes xml markup from file into an COCT_MT050012UK04Patient object
/// </summary>
/// <param name="fileName">string xml file to load and deserialize</param>
/// <param name="obj">Output COCT_MT050012UK04Patient object</param>
/// <param name="exception">output Exception value if deserialize failed</param>
/// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
public static bool LoadFromFile(string fileName, out COCT_MT050012UK04Patient obj, out System.Exception exception) {
exception = null;
obj = default(COCT_MT050012UK04Patient);
try {
obj = LoadFromFile(fileName);
return true;
}
catch (System.Exception ex) {
exception = ex;
return false;
}
}
public static bool LoadFromFile(string fileName, out COCT_MT050012UK04Patient obj) {
System.Exception exception = null;
return LoadFromFile(fileName, out obj, out exception);
}
public static COCT_MT050012UK04Patient LoadFromFile(string fileName) {
System.IO.FileStream file = null;
System.IO.StreamReader sr = null;
try {
file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
sr = new System.IO.StreamReader(file);
string xmlString = sr.ReadToEnd();
sr.Close();
file.Close();
return Deserialize(xmlString);
}
finally {
if ((file != null)) {
file.Dispose();
}
if ((sr != null)) {
sr.Dispose();
}
}
}
#endregion
#region Clone method
/// <summary>
/// Create a clone of this COCT_MT050012UK04Patient object
/// </summary>
public virtual COCT_MT050012UK04Patient Clone() {
return ((COCT_MT050012UK04Patient)(this.MemberwiseClone()));
}
#endregion
}
}
| 37.034884 | 1,358 | 0.546389 | [
"MIT"
] | Kusnaditjung/MimDms | src/Mim.V4200/Generated/COCT_MT050012UK04Patient.cs | 12,740 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using Harmony;
using Newtonsoft.Json.Linq;
using Overload;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.Networking.NetworkSystem;
namespace GameMod {
public static class ExtMatchMode
{
public const MatchMode ANARCHY = MatchMode.ANARCHY;
public const MatchMode TEAM_ANARCHY = MatchMode.TEAM_ANARCHY;
public const MatchMode MONSTERBALL = MatchMode.MONSTERBALL;
public const MatchMode CTF = (MatchMode)3;
public const MatchMode RACE = (MatchMode)4;
//public const MatchMode ARENA = (MatchMode)5;
//public const MatchMode TEAM_ARENA = (MatchMode)6;
public const MatchMode NUM = (MatchMode)((int)RACE + 1);
private static readonly string[] Names = new string[] {
"ANARCHY", "TEAM ANARCHY", "MONSTERBALL", "CTF", "RACE" };
public static string ToString(MatchMode mode)
{
if ((int)mode < 0 || (int)mode >= Names.Length)
return "UNEXPECTED MODE: " + (int)mode;
return Names[(int)mode];
}
}
static class MPModPrivateData
{
public static int TeamCount
{
get { return MPTeams.NetworkMatchTeamCount; }
set { MPTeams.NetworkMatchTeamCount = value; }
}
public static bool RearViewEnabled
{
get { return RearView.MPNetworkMatchEnabled; }
set { RearView.MPNetworkMatchEnabled = value; }
}
public static bool JIPEnabled
{
get { return MPJoinInProgress.NetworkMatchEnabled; }
set { MPJoinInProgress.NetworkMatchEnabled = value; }
}
public static bool SniperPacketsEnabled
{
get { return MPSniperPackets.enabled; }
set { MPSniperPackets.enabled = value; }
}
public static MatchMode MatchMode
{
get { return NetworkMatch.GetMode(); }
set { NetworkMatch.SetMode(value); }
}
public static bool SuddenDeathEnabled
{
get { return MPSuddenDeath.SuddenDeathMatchEnabled; }
set { MPSuddenDeath.SuddenDeathMatchEnabled = value; }
}
public static int LapLimit;
public static string MatchNotes { get; set; }
public static bool HasPassword { get; set; }
public static bool ScaleRespawnTime { get; set; }
public static int ModifierFilterMask;
public static bool ClassicSpawnsEnabled
{
get { return MPClassic.matchEnabled; }
set { MPClassic.matchEnabled = value; }
}
public static bool CtfCarrierBoostEnabled
{
get { return CTF.CarrierBoostEnabled; }
set { CTF.CarrierBoostEnabled = value; }
}
public static JObject Serialize()
{
JObject jobject = new JObject();
jobject["teamcount"] = TeamCount;
jobject["rearviewenabled"] = RearViewEnabled;
jobject["jipenabled"] = JIPEnabled;
jobject["sniperpacketsenabled"] = SniperPacketsEnabled;
jobject["matchmode"] = (int)MatchMode;
jobject["suddendeathenabled"] = SuddenDeathEnabled;
jobject["laplimit"] = LapLimit;
jobject["matchnotes"] = MatchNotes;
jobject["haspassword"] = HasPassword;
jobject["scalerespawntime"] = ScaleRespawnTime;
jobject["modifierfiltermask"] = ModifierFilterMask;
jobject["classicspawnsenabled"] = ClassicSpawnsEnabled;
jobject["ctfcarrierboostenabled"] = CtfCarrierBoostEnabled;
return jobject;
}
public static void Deserialize(JToken root)
{
TeamCount = root["teamcount"].GetInt(MPTeams.Min);
RearViewEnabled = root["rearviewenabled"].GetBool(false);
JIPEnabled = root["jipenabled"].GetBool(false);
SniperPacketsEnabled = root["sniperpacketsenabled"].GetBool(false);
MatchMode = (MatchMode)root["matchmode"].GetInt(0);
SuddenDeathEnabled = root["suddendeathenabled"].GetBool(false);
LapLimit = root["laplimit"].GetInt(0);
MatchNotes = root["matchnotes"].GetString(String.Empty);
HasPassword = root["haspassword"].GetBool(false);
ScaleRespawnTime = root["scalerespawntime"].GetBool(false);
ModifierFilterMask = root["modifierfiltermask"].GetInt(255);
ClassicSpawnsEnabled = root["classicspawnsenabled"].GetBool(false);
CtfCarrierBoostEnabled = root["ctfcarrierboostenabled"].GetBool(false);
}
public static string GetModeString(MatchMode mode)
{
return Loc.LS(ExtMatchMode.ToString(mode));
}
}
public class MPModPrivateDataTransfer
{
public static void SendTo(int connId)
{
var mmpdMsg = new StringMessage(MPModPrivateData.Serialize().ToString(Newtonsoft.Json.Formatting.None));
NetworkServer.SendToClient(connId, MessageTypes.MsgModPrivateData, mmpdMsg);
}
public static void OnReceived(string data)
{
Debug.LogFormat("MPModPrivateData: received {0}", data);
MPModPrivateData.Deserialize(JToken.Parse(data));
}
}
/*
public class MPModPrivateDataMessage : MessageBase
{
public int TeamCount { get; set; }
public bool RearViewEnabled { get; set; }
public bool JIPEnabled { get; set; }
public MatchMode MatchMode { get; set; }
public int LapLimit { get; set; }
public override void Serialize(NetworkWriter writer)
{
writer.Write((byte)0); // version
writer.WritePackedUInt32((uint)TeamCount);
writer.Write(RearViewEnabled);
writer.Write(JIPEnabled);
writer.WritePackedUInt32((uint)MatchMode);
writer.WritePackedUInt32((uint)LapLimit);
}
public override void Deserialize(NetworkReader reader)
{
var version = reader.ReadByte();
TeamCount = (int)reader.ReadPackedUInt32();
RearViewEnabled = reader.ReadBoolean();
JIPEnabled = reader.ReadBoolean();
MatchMode = (MatchMode)reader.ReadPackedUInt32();
LapLimit = (int)reader.ReadPackedUInt32();
}
}
*/
[HarmonyPatch(typeof(MenuManager), "GetMMSGameMode")]
class MPModPrivateData_MenuManager_GetMMSGameMode
{
static bool Prefix(ref string __result)
{
__result = MPModPrivateData.GetModeString(MenuManager.mms_mode);
return false;
}
}
[HarmonyPatch(typeof(UIElement), "DrawMpMatchSetup")]
class MPModPrivateData_UIElement_DrawMpMatchSetup
{
static void Postfix(UIElement __instance)
{
if (MenuManager.m_menu_micro_state == 2 && MenuManager.mms_mode == ExtMatchMode.RACE)
{
Vector2 position = Vector2.zero;
position.y = -279f + 62f * 6;
var text = ExtMenuManager.mms_ext_lap_limit == 0 ? "NONE" : ExtMenuManager.mms_ext_lap_limit.ToString();
__instance.SelectAndDrawStringOptionItem("LAP LIMIT", position, 10, text, string.Empty, 1.5f, false);
}
}
}
[HarmonyPatch(typeof(MenuManager), "MpMatchSetup")]
class MPModPrivateData_MenuManager_MpMatchSetup
{
static void MatchModeSlider()
{
MenuManager.mms_mode = (MatchMode)(((int)MenuManager.mms_mode + (int)ExtMatchMode.NUM + UIManager.m_select_dir) % (int)ExtMatchMode.NUM);
return;
}
static void HandleLapLimit()
{
if (MenuManager.m_menu_sub_state == MenuSubState.ACTIVE &&
MenuManager.m_menu_micro_state == 2 &&
UIManager.m_menu_selection == 10)
{
//ExtMenuManager.mms_ext_lap_limit = (ExtMenuManager.mms_ext_lap_limit + 21 + UIManager.m_select_dir) % 21;
ExtMenuManager.mms_ext_lap_limit = Math.Max(0, Math.Min(50, ExtMenuManager.mms_ext_lap_limit + UIManager.m_select_dir * 5));
MenuManager.PlayCycleSound(1f, (float)UIManager.m_select_dir);
}
}
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> codes)
{
bool remove = false;
foreach (var code in codes)
{
if (code.opcode == OpCodes.Call && ((MethodInfo)code.operand).Name == "MaybeReverseOption")
{
yield return code;
yield return new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(MPModPrivateData_MenuManager_MpMatchSetup), "HandleLapLimit"));
continue;
}
if (code.opcode == OpCodes.Ldsfld && (code.operand as FieldInfo).Name == "mms_mode")
{
remove = true;
code.opcode = OpCodes.Call;
code.operand = AccessTools.Method(typeof(MPModPrivateData_MenuManager_MpMatchSetup), "MatchModeSlider");
yield return code;
}
if (code.opcode == OpCodes.Stsfld && (code.operand as FieldInfo).Name == "mms_mode")
{
remove = false;
continue;
}
if (remove)
continue;
yield return code;
}
}
}
public class ExtMenuManager
{
public static int mms_ext_lap_limit = 10;
}
[HarmonyPatch(typeof(NetworkMatch), "GetModeString")]
class MPModPrivateData_NetworkMatch_GetModeString
{
// there's a mode argument but in actual usage this is always NetworkMatch.GetMode()
// so ignore it here, since the default value MatchMode.NUM means CTF now :(
static bool Prefix(MatchMode mode, ref string __result)
{
__result = MPModPrivateData.GetModeString(NetworkMatch.GetMode());
return false;
}
}
[HarmonyPatch(typeof(Client), "RegisterHandlers")]
class MPModPrivateData_Client_RegisterHandlers
{
private static void OnModPrivateData(NetworkMessage msg)
{
/*
MPModPrivateDataMessage mpdm = msg.ReadMessage<MPModPrivateDataMessage>();
MPModPrivateData.MatchMode = mpdm.MatchMode;
MPModPrivateData.JIPEnabled = mpdm.JIPEnabled;
MPModPrivateData.RearViewEnabled = mpdm.RearViewEnabled;
MPModPrivateData.TeamCount = mpdm.TeamCount;
MPModPrivateData.LapLimit = mpdm.LapLimit;
*/
MPModPrivateDataTransfer.OnReceived(msg.ReadMessage<StringMessage>().value);
}
static void Postfix()
{
if (Client.GetClient() == null)
return;
Client.GetClient().RegisterHandler(MessageTypes.MsgModPrivateData, OnModPrivateData);
}
}
/*
[HarmonyPatch(typeof(Server), "SendAcceptedToLobby")]
class MPModPrivateData_Server_SendAcceptedToLobby
{
static void Postfix(NetworkConnection conn)
{
var server = NetworkMatch.m_client_server_location;
if (!server.StartsWith("OLMOD ") || server == "OLMOD 0.2.8" || server.StartsWith("OLMOD 0.2.8."))
return;
/-*
var msg = new MPModPrivateDataMessage
{
JIPEnabled = MPModPrivateData.JIPEnabled,
MatchMode = MPModPrivateData.MatchMode,
RearViewEnabled = MPModPrivateData.RearViewEnabled,
TeamCount = MPModPrivateData.TeamCount,
LapLimit = MPModPrivateData.LapLimit
};
*-/
var msg = new StringMessage(MPModPrivateData.Serialize().ToString(Newtonsoft.Json.Formatting.None));
NetworkServer.SendToClient(conn.connectionId, ModCustomMsg.MsgModPrivateData, msg);
}
}
*/
[HarmonyPatch(typeof(NetworkMatch), "NetSystemOnGameSessionStart")]
class NetworkMatch_NetSystemOnGameSessionStart
{
public static string ModNetSystemOnGameSessionStart(Dictionary<string, object> attributes)
{
return attributes.ContainsKey("mod_private_data") ? (string)attributes["mod_private_data"] : "";
}
public static void ModNetSystemOnGameSessionStart2(string mpd)
{
if (mpd != "")
MPModPrivateDataTransfer.OnReceived(mpd);
}
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator ilGen)
{
LocalBuilder a = ilGen.DeclareLocal(typeof(string));
var codes = instructions.ToList();
int startIdx = -1;
int startIdx2 = -1;
for (int i = 0; i < codes.Count; i++)
{
if (codes[i].opcode == OpCodes.Ldstr && (string)codes[i].operand == "private_match_data")
{
startIdx = i - 3;
}
//if (codes[i].opcode == OpCodes.Ldstr && (string)codes[i].operand == "Unpacked private match data for: {0}")
if (codes[i].opcode == OpCodes.Ldsfld && ((MemberInfo)codes[i].operand).Name == "m_max_players_for_match" && startIdx2 == -1)
{
startIdx2 = i;
}
}
// insert backwards to preserve indexes
if (startIdx2 > -1 && startIdx > -1)
{
var labels = codes[startIdx2].labels;
codes[startIdx2].labels = new List<Label>();
codes.InsertRange(startIdx2, new[]
{
new CodeInstruction(OpCodes.Ldloc_S, a) { labels = labels },
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(NetworkMatch_NetSystemOnGameSessionStart), "ModNetSystemOnGameSessionStart2"))
});
}
if (startIdx > -1)
{
List<CodeInstruction> newCodes = new List<CodeInstruction>();
for (int i = startIdx; i < startIdx + 3; i++) // copy loads for attributes dict
{
newCodes.Add(new CodeInstruction(codes[i].opcode, codes[i].operand));
}
newCodes.Add(new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(NetworkMatch_NetSystemOnGameSessionStart), "ModNetSystemOnGameSessionStart")));
newCodes.Add(new CodeInstruction(OpCodes.Stloc_S, a));
codes.InsertRange(startIdx, newCodes);
}
return codes;
}
}
[HarmonyPatch(typeof(NetworkMatch), "StartMatchMakerRequest")]
class MPModPrivateData_NetworkMatch_StartMatchMakerRequest
{
public static void PatchModPrivateData(MatchmakerPlayerRequest matchmakerPlayerRequest)
{
if (!MenuManager.m_mp_lan_match) // LAN includes internet match
return;
MPModPrivateData.MatchMode = MenuManager.mms_mode;
MPModPrivateData.RearViewEnabled = RearView.MPMenuManagerEnabled;
MPModPrivateData.JIPEnabled = MPJoinInProgress.MenuManagerEnabled || MPJoinInProgress.SingleMatchEnable;
MPModPrivateData.TeamCount = MPTeams.MenuManagerTeamCount;
MPModPrivateData.LapLimit = ExtMenuManager.mms_ext_lap_limit;
MPModPrivateData.MatchNotes = MPServerBrowser.mms_match_notes;
MPModPrivateData.SniperPacketsEnabled = true;
MPModPrivateData.ScaleRespawnTime = Menus.mms_scale_respawn_time;
MPModPrivateData.ModifierFilterMask = RUtility.BoolArrayToBitmask(MPModifiers.mms_modifier_filter);
MPModPrivateData.ClassicSpawnsEnabled = Menus.mms_classic_spawns;
MPModPrivateData.CtfCarrierBoostEnabled = Menus.mms_ctf_boost;
var mpd = (PrivateMatchDataMessage)AccessTools.Field(typeof(NetworkMatch), "m_private_data").GetValue(null);
MPModPrivateData.HasPassword = mpd.m_password.Contains('_');
matchmakerPlayerRequest.PlayerAttributes["mod_private_data"] = MPModPrivateData.Serialize().ToString(Newtonsoft.Json.Formatting.None);
}
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> codes)
{
int i = 0;
CodeInstruction last = null;
CodeInstruction mmprAttributes = null;
foreach (var code in codes)
{
if (code.opcode == OpCodes.Ldstr && (string)code.operand == "players")
mmprAttributes = last;
if (mmprAttributes == null)
last = code;
if (mmprAttributes != null && code.opcode == OpCodes.Ldsfld && code.operand == AccessTools.Field(typeof(NetworkMatch), "m_private_data"))
{
i++;
if (i == 3)
{
CodeInstruction ci1 = new CodeInstruction(OpCodes.Ldloc_S, mmprAttributes.operand);
CodeInstruction ci2 = new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(MPModPrivateData_NetworkMatch_StartMatchMakerRequest), "PatchModPrivateData"));
yield return ci1;
yield return ci2;
}
}
yield return code;
}
}
}
}
| 40.188209 | 185 | 0.602438 | [
"MIT"
] | sjackso/olmod | GameMod/MPModPrivateData.cs | 17,725 | C# |
namespace Eklee.Azure.Functions.Http.Example
{
public interface IMyRequestScope
{
string Id { get; }
}
}
| 15.75 | 45 | 0.634921 | [
"MIT"
] | seekdavidlee/Eklee-Azure-Functions-Http | Examples/Eklee.Azure.Functions.Http.Example/IMyRequestScope.cs | 128 | C# |
using Microsoft.Extensions.Logging;
using Ninja.WebSockets;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
namespace WebSockets.DemoServer
{
class Program
{
static ILogger _logger;
static ILoggerFactory _loggerFactory;
static IWebSocketServerFactory _webSocketServerFactory;
static void Main(string[] args)
{
_loggerFactory = new LoggerFactory();
_loggerFactory.AddConsole(LogLevel.Trace);
_logger = _loggerFactory.CreateLogger<Program>();
_webSocketServerFactory = new WebSocketServerFactory();
Task task = StartWebServer();
task.Wait();
}
static async Task StartWebServer()
{
try
{
int port = 27416;
IList<string> supportedSubProtocols = new string[] { "chatV1", "chatV2", "chatV3" };
using (WebServer server = new WebServer(_webSocketServerFactory, _loggerFactory, supportedSubProtocols))
{
await server.Listen(port);
_logger.LogInformation($"Listening on port {port}");
_logger.LogInformation("Press any key to quit");
Console.ReadKey();
}
}
catch (Exception ex)
{
_logger.LogError(ex.ToString());
Console.ReadKey();
}
}
}
}
| 31.270833 | 120 | 0.563624 | [
"MIT"
] | Katori/Ninja.WebSockets-Upgraded | Ninja.WebSockets.DemoServer/Program.cs | 1,503 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SparqlExplorer.Tests
{
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Model;
using System.IO;
[TestClass]
public class GraphManagerTests
{
private GraphManager _graphManager;
private string _cachePath;
private string _assemblyLocation;
private string _testDataFolder;
public GraphManagerTests()
{
_assemblyLocation = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
_testDataFolder = _assemblyLocation + "\\Tests\\Data\\";
}
[TestInitialize]
public void TestInitialize()
{
_cachePath = Path.GetTempPath();
_graphManager = new GraphManager(_cachePath);
}
private class CachePathTester : GraphManager
{
public CachePathTester() : base() { }
public CachePathTester(string path) : base(path) { }
public string CachePath { get { return _cachePath; } }
}
[TestMethod]
public void CheckDefaultCachePath()
{
CachePathTester cachePathTester = new CachePathTester();
Assert.AreEqual(_assemblyLocation + "\\cache", cachePathTester.CachePath);
}
[TestMethod]
public void CheckValidCachePath()
{
string tempPath = Path.GetTempPath();
CachePathTester cachePathTester = new CachePathTester(tempPath);
Assert.AreEqual(tempPath + "\\cache", cachePathTester.CachePath);
}
[TestMethod]
[ExpectedException(typeof(System.IO.DirectoryNotFoundException), "Expected an uncreatable cache path to throw an exception")]
public void CheckInvalidCachePath()
{
string invalidPath = Path.GetTempPath() + "\\this_folder_does_not_exist";
Assert.IsFalse(Directory.Exists(invalidPath));
CachePathTester cachePathTester = new CachePathTester(invalidPath);
}
[TestMethod]
[ExpectedException(typeof(Model.GraphReadException))]
public void TryToReadInvalidRdf()
{
_graphManager.LoadGraphFromString("this is invalid data that should not parse");
}
[TestMethod]
[ExpectedException(typeof(Model.GraphReadException))]
public void TryToReadInvalidFile()
{
_graphManager.LoadGraphFromFile(_testDataFolder + "invalid.txt");
}
[TestMethod]
[ExpectedException(typeof(FileNotFoundException))]
public void TryToReadNonexistentFile()
{
_graphManager.LoadGraphFromFile(_testDataFolder + "this file does not exist");
}
[TestMethod]
public void ReadSaveAndLoadData()
{
_graphManager.LoadGraphFromFile(_testDataFolder + "linkedmdb.org_bonnie_palef.xml");
Assert.AreEqual(11, _graphManager.GraphNodeCount);
string csvFile = Path.GetTempFileName() + ".csv";
_graphManager.SaveGraph(csvFile);
string[] csvData = File.ReadAllLines(csvFile);
Assert.AreEqual(15, csvData.Length);
Assert.IsTrue(csvData.Contains("http://data.linkedmdb.org/resource/producer/3937,http://www.w3.org/1999/02/22-rdf-syntax-ns#type,http://data.linkedmdb.org/resource/movie/producer"));
Assert.IsTrue(csvData.Contains("http://data.linkedmdb.org/resource/producer/3937,http://www.w3.org/2000/01/rdf-schema#label,Bonnie Palef (Producer)"));
Assert.IsTrue(csvData.Contains("http://data.linkedmdb.org/resource/producer/3937,http://data.linkedmdb.org/resource/movie/producer_name,Bonnie Palef"));
Assert.IsTrue(csvData.Contains("http://data.linkedmdb.org/resource/producer/3937,http://data.linkedmdb.org/resource/movie/producer_producerid,3937"));
Assert.IsTrue(csvData.Contains("http://www.freebase.com/view/guid/9202a8c04000641f800000000110de31,http://www.w3.org/2000/01/rdf-schema#seeAlso,http://data.linkedmdb.org/sparql?query=DESCRIBE+%3Chttp%3A%2F%2Fwww.freebase.com%2Fview%2Fguid%2F9202a8c04000641f800000000110de31%3E"));
Assert.IsTrue(csvData.Contains("http://data.linkedmdb.org/resource/producer/3937,http://xmlns.com/foaf/0.1/page,http://www.freebase.com/view/guid/9202a8c04000641f800000000110de31"));
Assert.IsTrue(csvData.Contains("http://data.linkedmdb.org/resource/film/7358,http://data.linkedmdb.org/resource/movie/producer,http://data.linkedmdb.org/resource/producer/3937"));
Assert.IsTrue(csvData.Contains("http://data.linkedmdb.org/data/producer/3937,http://www.w3.org/2000/01/rdf-schema#comment,\"Contents of this file may include content from "));
Assert.IsTrue(csvData.Contains("\t\t FreeBase (http://www.freebase.com) or Wikipedia "));
Assert.IsTrue(csvData.Contains("\t\t (http://www.wikipedia.org) licensed under CC-BY"));
Assert.IsTrue(csvData.Contains("\t\t (http://www.freebase.com/view/common/license/cc_attribution_25)"));
Assert.IsTrue(csvData.Contains("\t\t or GFDL (http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License). "));
Assert.IsTrue(csvData.Contains("\t\t Refer to http://www.linkedmdb.org:8080/Main/Licensing for more details.\""));
Assert.IsTrue(csvData.Contains("http://data.linkedmdb.org/data/producer/3937,http://www.w3.org/2000/01/rdf-schema#label,RDF Description of Bonnie Palef (Producer)"));
Assert.IsTrue(csvData.Contains("http://data.linkedmdb.org/data/producer/3937,http://xmlns.com/foaf/0.1/primaryTopic,http://data.linkedmdb.org/resource/producer/3937"));
}
[TestMethod]
public void StreamGraph()
{
_graphManager.LoadGraphFromFile(_testDataFolder + "linkedmdb.org_bonnie_palef.xml");
Assert.AreEqual(11, _graphManager.GraphNodeCount);
foreach (string outputFormat in new string[] { "ttl", "nt", "ttl", "nt", "ttl", "nt" })
{
StringBuilder sb = new StringBuilder();
using (StringWriter stringWriter = new StringWriter(sb))
{
_graphManager.StreamGraph(stringWriter, outputFormat);
}
_graphManager.LoadGraphFromString(sb.ToString());
Assert.AreEqual(11, _graphManager.GraphNodeCount);
}
}
[TestMethod]
public void StreamQueryResults()
{
_graphManager.LoadGraphFromFile(_testDataFolder + "http___data.linkedmdb.org_data_country_US.ttl");
Assert.AreEqual(21, _graphManager.GraphNodeCount);
string query = "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT * { ?s rdfs:label ?o . }";
IEnumerable<string> columnNames;
_graphManager.ExecuteSparqlQuery(query, out columnNames);
Assert.AreEqual(2, columnNames.Count());
StringBuilder sb = new StringBuilder();
using (StringWriter stringWriter = new StringWriter(sb))
{
_graphManager.StreamSparqlQueryResults(stringWriter, "csv");
}
Assert.AreEqual(@"s,o
http://data.linkedmdb.org/data/country/US,RDF Description of United States (Country)
http://data.linkedmdb.org/resource/country/US,United States (Country)
",
sb.ToString());
}
[TestMethod]
public void ReadAFewFormats()
{
_graphManager.LoadGraphFromFile(_testDataFolder + "http___data.linkedmdb.org_data_country_AD.xml");
Assert.AreEqual(21, _graphManager.GraphNodeCount);
_graphManager.LoadGraphFromFile(_testDataFolder + "http___data.linkedmdb.org_data_country_US.ttl");
Assert.AreEqual(21, _graphManager.GraphNodeCount);
_graphManager.LoadGraphFromFile(_testDataFolder + "linkedmdb.org_bonnie_palef.xml");
Assert.AreEqual(11, _graphManager.GraphNodeCount);
_graphManager.LoadGraphFromFile(_testDataFolder + "linkedmdb.org_parents.json");
Assert.AreEqual(52, _graphManager.GraphNodeCount);
}
[TestMethod]
public void TestCertificates()
{
_graphManager.X509Certificate = X509CertificateFileReader.ReadX509Certificate(_testDataFolder + "examplecert.cert", _testDataFolder + "examplecert.key");
Assert.AreEqual("E=astellman@stellman-greene.com, CN=Andrew Stellman, OU=Example, O=Example Certificate, L=Brooklyn, S=New York, C=US", _graphManager.X509Certificate.Subject);
Assert.AreEqual("E=astellman@stellman-greene.com, CN=Andrew Stellman, OU=Certificate Authority, O=Stellman and Greene Consulting, L=Brooklyn, S=New York, C=US", _graphManager.X509Certificate.Issuer);
}
}
}
| 50.027933 | 292 | 0.664545 | [
"MIT"
] | andrewstellman/sparql-explorer | Tests/GraphManagerTests.cs | 8,957 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
namespace Microsoft.Psi.Imaging
{
using System;
/// <summary>
/// Set of static functions for manipulating pixel formats.
/// </summary>
internal static class PixelFormatHelper
{
/// <summary>
/// Converts from a system pixel format into a Psi.Imaging pixel format.
/// </summary>
/// <param name="pixelFormat">System pixel format to be converted.</param>
/// <returns>Psi.Imaging pixel format that matches the specified system pixel format.</returns>
internal static PixelFormat FromSystemPixelFormat(System.Drawing.Imaging.PixelFormat pixelFormat)
{
if (pixelFormat == System.Drawing.Imaging.PixelFormat.Format24bppRgb)
{
return PixelFormat.BGR_24bpp;
}
if (pixelFormat == System.Drawing.Imaging.PixelFormat.Format32bppRgb)
{
return PixelFormat.BGRX_32bpp;
}
if (pixelFormat == System.Drawing.Imaging.PixelFormat.Format8bppIndexed)
{
return PixelFormat.Gray_8bpp;
}
if (pixelFormat == System.Drawing.Imaging.PixelFormat.Format16bppGrayScale)
{
return PixelFormat.Gray_16bpp;
}
if (pixelFormat == System.Drawing.Imaging.PixelFormat.Format32bppArgb)
{
return PixelFormat.BGRA_32bpp;
}
if (pixelFormat == System.Drawing.Imaging.PixelFormat.Format64bppArgb)
{
return PixelFormat.RGBA_64bpp;
}
throw new NotSupportedException($"The {pixelFormat} pixel format is not currently supported by {nameof(Microsoft.Psi.Imaging)}.");
}
/// <summary>
/// Converts from a Psi.Imaging PixelFormat to a System.Drawing.Imaging.PixelFormat.
/// </summary>
/// <param name="pixelFormat">Pixel format to convert.</param>
/// <returns>The system pixel format that corresponds to the Psi.Imaging pixel format.</returns>
internal static System.Drawing.Imaging.PixelFormat ToSystemPixelFormat(PixelFormat pixelFormat)
{
return pixelFormat switch
{
PixelFormat.BGR_24bpp => System.Drawing.Imaging.PixelFormat.Format24bppRgb,
PixelFormat.BGRX_32bpp => System.Drawing.Imaging.PixelFormat.Format32bppRgb,
PixelFormat.Gray_8bpp => System.Drawing.Imaging.PixelFormat.Format8bppIndexed,
PixelFormat.Gray_16bpp => System.Drawing.Imaging.PixelFormat.Format16bppGrayScale,
PixelFormat.BGRA_32bpp => System.Drawing.Imaging.PixelFormat.Format32bppArgb,
PixelFormat.RGBA_64bpp => System.Drawing.Imaging.PixelFormat.Format64bppArgb,
PixelFormat.Undefined =>
throw new InvalidOperationException(
$"Cannot convert {nameof(PixelFormat.Undefined)} pixel format to {nameof(System.Drawing.Imaging.PixelFormat)}."),
_ => throw new Exception("Unknown pixel format."),
};
}
/// <summary>
/// Returns number of bytes/pixel for the specified pixel format.
/// </summary>
/// <param name="pixelFormat">Pixel format for which to determine number of bytes.</param>
/// <returns>Number of bytes in each pixel of the specified format.</returns>
internal static int GetBytesPerPixel(PixelFormat pixelFormat)
{
switch (pixelFormat)
{
case PixelFormat.Gray_8bpp:
return 1;
case PixelFormat.Gray_16bpp:
return 2;
case PixelFormat.BGR_24bpp:
return 3;
case PixelFormat.BGRX_32bpp:
case PixelFormat.BGRA_32bpp:
return 4;
case PixelFormat.RGBA_64bpp:
return 8;
case PixelFormat.Undefined:
return 0;
default:
throw new ArgumentException("Unknown pixel format");
}
}
}
}
| 39.238532 | 142 | 0.594108 | [
"MIT"
] | Bhaskers-Blu-Org2/psi | Sources/Imaging/Microsoft.Psi.Imaging/PixelFormatHelper.cs | 4,279 | C# |
using System;
using System.Xml.Serialization;
using System.ComponentModel.DataAnnotations;
using BroadWorksConnector.Ocip.Validation;
using System.Collections.Generic;
namespace BroadWorksConnector.Ocip.Models
{
/// <summary>
/// Request to modify a Network Server in the system.
/// The response is either a SuccessResponse or an ErrorResponse.
/// The following elements are only used in AS data mode and ignored in XS data mode:
/// becomePreferred
/// The following elements are only used in XS data mode and ignored in AS data mode:
/// order
/// <see cref="SuccessResponse"/>
/// <see cref="ErrorResponse"/>
/// </summary>
[Serializable]
[XmlRoot(Namespace = "")]
[Groups(@"[{""__type"":""Sequence:#BroadWorksConnector.Ocip.Validation"",""id"":""7f663d5135470c33ca64b0eed3c3aa0c:12922""}]")]
public class SystemNetworkSynchingServerModifyRequest22 : BroadWorksConnector.Ocip.Models.C.OCIRequest<BroadWorksConnector.Ocip.Models.C.SuccessResponse>
{
private string _netAddress;
[XmlElement(ElementName = "netAddress", IsNullable = false, Namespace = "")]
[Group(@"7f663d5135470c33ca64b0eed3c3aa0c:12922")]
[MinLength(1)]
[MaxLength(80)]
public string NetAddress
{
get => _netAddress;
set
{
NetAddressSpecified = true;
_netAddress = value;
}
}
[XmlIgnore]
protected bool NetAddressSpecified { get; set; }
private int _port;
[XmlElement(ElementName = "port", IsNullable = false, Namespace = "")]
[Optional]
[Group(@"7f663d5135470c33ca64b0eed3c3aa0c:12922")]
[MinInclusive(1025)]
[MaxInclusive(65535)]
public int Port
{
get => _port;
set
{
PortSpecified = true;
_port = value;
}
}
[XmlIgnore]
protected bool PortSpecified { get; set; }
private string _description;
[XmlElement(ElementName = "description", IsNullable = true, Namespace = "")]
[Optional]
[Group(@"7f663d5135470c33ca64b0eed3c3aa0c:12922")]
[MinLength(1)]
[MaxLength(80)]
public string Description
{
get => _description;
set
{
DescriptionSpecified = true;
_description = value;
}
}
[XmlIgnore]
protected bool DescriptionSpecified { get; set; }
private bool _becomePreferred;
[XmlElement(ElementName = "becomePreferred", IsNullable = false, Namespace = "")]
[Optional]
[Group(@"7f663d5135470c33ca64b0eed3c3aa0c:12922")]
public bool BecomePreferred
{
get => _becomePreferred;
set
{
BecomePreferredSpecified = true;
_becomePreferred = value;
}
}
[XmlIgnore]
protected bool BecomePreferredSpecified { get; set; }
private int _order;
[XmlElement(ElementName = "order", IsNullable = false, Namespace = "")]
[Optional]
[Group(@"7f663d5135470c33ca64b0eed3c3aa0c:12922")]
[MinInclusive(1)]
[MaxInclusive(32767)]
public int Order
{
get => _order;
set
{
OrderSpecified = true;
_order = value;
}
}
[XmlIgnore]
protected bool OrderSpecified { get; set; }
private bool _secure;
[XmlElement(ElementName = "secure", IsNullable = false, Namespace = "")]
[Optional]
[Group(@"7f663d5135470c33ca64b0eed3c3aa0c:12922")]
public bool Secure
{
get => _secure;
set
{
SecureSpecified = true;
_secure = value;
}
}
[XmlIgnore]
protected bool SecureSpecified { get; set; }
}
}
| 28.426573 | 157 | 0.559902 | [
"MIT"
] | cwmiller/broadworks-connector-net | BroadworksConnector/Ocip/Models/SystemNetworkSynchingServerModifyRequest22.cs | 4,065 | C# |
using Alex.Blocks.Materials;
using Alex.Common.Items;
using Alex.Utils;
namespace Alex.Blocks.Minecraft
{
public class DiamondBlock : Block
{
public DiamondBlock() : base()
{
Solid = true;
Transparent = false;
base.BlockMaterial = Material.Metal.Clone().WithMapColor(MapColor.Diamond).SetRequiredTool(ItemType.PickAxe, ItemMaterial.Stone);
}
}
}
| 21.470588 | 132 | 0.739726 | [
"MPL-2.0",
"MPL-2.0-no-copyleft-exception"
] | codingwatching/Alex | src/Alex/Blocks/Minecraft/DiamondBlock.cs | 365 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Dashboard.UWP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Dashboard.UWP")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]
| 34.8 | 84 | 0.739464 | [
"MIT"
] | PacktPublishing/Creating-Cross-Platform-C-Sharp-Applications-with-Uno-Platform | Chapter06/Dashboard.UWP/Properties/AssemblyInfo.cs | 1,047 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Orchard.Settings.ViewModels
{
public class SiteSettingsViewModel
{
public string SiteName { get; set; }
public string TimeZone { get; set; }
public IEnumerable<TimeZoneInfo> TimeZones { get; set; }
}
}
| 23.133333 | 64 | 0.697406 | [
"BSD-3-Clause"
] | ChipSoftTech/CST-CMS | src/OrchardCore.Modules/Orchard.Settings/ViewModels/SiteSettingsViewModel.cs | 349 | C# |
// Copyright 2019 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using NtApiDotNet.Ndr;
using NtApiDotNet.Ndr.Marshal;
using NtApiDotNet.Win32.Rpc.Transport;
using NtApiDotNet.Win32.SafeHandles;
using System;
using System.Collections.Generic;
namespace NtApiDotNet.Win32.Rpc
{
/// <summary>
/// Base class for a RPC client.
/// </summary>
public abstract class RpcClientBase : IDisposable
{
#region Private Members
private IRpcClientTransport _transport;
private RpcEndpoint LookupEndpoint(string protocol_seq, string network_address)
{
var endpoint = RpcEndpointMapper.MapServerToEndpoint(protocol_seq, network_address, InterfaceId, InterfaceVersion);
if (endpoint == null || string.IsNullOrEmpty(endpoint.Endpoint))
{
throw new ArgumentException($"Can't find endpoint for {InterfaceId} {InterfaceVersion} with protocol sequence {protocol_seq}");
}
return endpoint;
}
private RpcEndpoint LookupEndpoint(string string_binding)
{
var endpoint = RpcEndpointMapper.MapBindingStringToEndpoint(string_binding, InterfaceId, InterfaceVersion);
if (endpoint == null || string.IsNullOrEmpty(endpoint.Endpoint))
{
throw new ArgumentException($"Can't find endpoint for {InterfaceId} {InterfaceVersion} for binding string {string_binding}");
}
return endpoint;
}
#endregion
#region Constructors
/// <summary>
/// Constructor.
/// </summary>
/// <param name="interface_id">The interface ID.</param>
/// <param name="interface_version">Version of the interface.</param>
protected RpcClientBase(Guid interface_id, Version interface_version)
{
InterfaceId = interface_id;
InterfaceVersion = interface_version;
}
/// <summary>
/// Constructor.
/// </summary>
/// <param name="interface_id">The interface ID as a string.</param>
/// <param name="major">Major version of the interface.</param>
/// <param name="minor">Minor version of the interface.</param>
protected RpcClientBase(string interface_id, int major, int minor)
: this(new Guid(interface_id), new Version(major, minor))
{
}
#endregion
#region Protected Methods
/// <summary>
/// Send and receive an RPC message.
/// </summary>
/// <param name="proc_num">The procedure number.</param>
/// <param name="data_representation">The NDR data representation.</param>
/// <param name="ndr_buffer">Marshal NDR buffer for the call.</param>
/// <param name="handles">List of handles marshaled into the buffer.</param>
/// <returns>Unmarshal NDR buffer for the result.</returns>
protected RpcClientResponse SendReceive(int proc_num, NdrDataRepresentation data_representation,
byte[] ndr_buffer, IReadOnlyCollection<NtObject> handles)
{
if (!Connected)
{
throw new InvalidOperationException("RPC client is not connected.");
}
RpcUtils.DumpBuffer(false, "NDR Send Data", ndr_buffer);
var resp = _transport.SendReceive(proc_num, ObjectUuid, data_representation, ndr_buffer, handles);
RpcUtils.DumpBuffer(false, "NDR Receive Data", resp.NdrBuffer);
return resp;
}
#endregion
#region Public Properties
/// <summary>
/// Get whether the client is connected or not.
/// </summary>
public bool Connected => _transport?.Connected ?? false;
/// <summary>
/// Get the endpoint that we connected to.
/// </summary>
public string Endpoint => _transport?.Endpoint ?? string.Empty;
/// <summary>
/// Get the protocol sequence that we connected to.
/// </summary>
public string ProtocolSequence => _transport?.ProtocolSequence ?? string.Empty;
/// <summary>
/// Get or set the current Object UUID used for calls.
/// </summary>
public Guid ObjectUuid { get; set; }
/// <summary>
/// The RPC interface ID.
/// </summary>
public Guid InterfaceId { get; }
/// <summary>
/// The RPC interface version.
/// </summary>
public Version InterfaceVersion { get; }
/// <summary>
/// Get the client transport object.
/// </summary>
public IRpcClientTransport Transport => _transport;
#endregion
#region Public Methods
/// <summary>
/// Connect the client to a RPC endpoint.
/// </summary>
/// <param name="endpoint">The endpoint for RPC server.</param>
/// <param name="transport_security">The transport security for the connection.</param>
public void Connect(RpcEndpoint endpoint, RpcTransportSecurity transport_security)
{
if (Connected)
{
throw new InvalidOperationException("RPC client is already connected.");
}
if (endpoint == null)
{
throw new ArgumentNullException("Must specify an endpoint", nameof(endpoint));
}
try
{
_transport = RpcClientTransportFactory.ConnectEndpoint(endpoint, transport_security);
_transport.Bind(InterfaceId, InterfaceVersion, NdrNativeUtils.DCE_TransferSyntax, new Version(2, 0));
ObjectUuid = endpoint.ObjectUuid;
}
catch
{
// Disconnect transport on any exception.
_transport?.Disconnect();
_transport = null;
throw;
}
}
/// <summary>
/// Connect the client to a RPC endpoint.
/// </summary>
/// <param name="endpoint">The endpoint for RPC server.</param>
/// <param name="security_quality_of_service">The security quality of service for the connection.</param>
[Obsolete("Use Connect specifying RpcTransportSecurity.")]
public void Connect(RpcEndpoint endpoint, SecurityQualityOfService security_quality_of_service)
{
Connect(endpoint, new RpcTransportSecurity(security_quality_of_service));
}
/// <summary>
/// Connect the client to a RPC endpoint.
/// </summary>
/// <param name="protocol_seq">The protocol sequence for the transport.</param>
/// <param name="endpoint">The endpoint for the protocol sequence.</param>
/// <param name="network_address">The network address for the protocol sequence.</param>
/// <param name="security_quality_of_service">The security quality of service for the connection.</param>
[Obsolete("Use Connect specifying RpcTransportSecurity.")]
public void Connect(string protocol_seq, string endpoint, string network_address, SecurityQualityOfService security_quality_of_service)
{
Connect(protocol_seq, endpoint, network_address, new RpcTransportSecurity(security_quality_of_service));
}
/// <summary>
/// Connect the client to a RPC endpoint.
/// </summary>
/// <param name="protocol_seq">The protocol sequence for the transport.</param>
/// <param name="endpoint">The endpoint for the protocol sequence.</param>
/// <param name="network_address">The network address for the protocol sequence.</param>
/// <param name="transport_security">The transport security for the connection.</param>
public void Connect(string protocol_seq, string endpoint, string network_address, RpcTransportSecurity transport_security)
{
if (Connected)
{
throw new InvalidOperationException("RPC client is already connected.");
}
if (string.IsNullOrEmpty(protocol_seq))
{
throw new ArgumentException("Must specify a protocol sequence", nameof(protocol_seq));
}
Connect(string.IsNullOrEmpty(endpoint) ? LookupEndpoint(protocol_seq, network_address) :
new RpcEndpoint(InterfaceId, InterfaceVersion,
SafeRpcBindingHandle.Compose(null, protocol_seq,
string.IsNullOrEmpty(network_address) ? null : network_address, endpoint, null), true),
transport_security);
}
/// <summary>
/// Connect the client to a RPC endpoint.
/// </summary>
/// <param name="protocol_seq">The protocol sequence for the transport.</param>
/// <param name="endpoint">The endpoint for the protocol sequence.</param>
/// <param name="security_quality_of_service">The security quality of service for the connection.</param>
[Obsolete("Use Connect specifying RpcTransportSecurity.")]
public void Connect(string protocol_seq, string endpoint, SecurityQualityOfService security_quality_of_service)
{
Connect(protocol_seq, endpoint, null, security_quality_of_service);
}
/// <summary>
/// Connect the client to a RPC endpoint.
/// </summary>
/// <param name="protocol_seq">The protocol sequence for the transport.</param>
/// <param name="endpoint">The endpoint for the protocol sequence.</param>
/// <param name="transport_security">The transport security for the connection.</param>
public void Connect(string protocol_seq, string endpoint, RpcTransportSecurity transport_security)
{
Connect(protocol_seq, endpoint, null, transport_security);
}
/// <summary>
/// Connect the client to an ALPC RPC port.
/// </summary>
/// <param name="alpc_path">The path to the ALPC RPC port.</param>
/// <param name="security_quality_of_service">The security quality of service for the port.</param>
public void Connect(string alpc_path, SecurityQualityOfService security_quality_of_service)
{
if (Connected)
{
throw new InvalidOperationException("RPC client is already connected.");
}
Connect("ncalrpc", alpc_path, new RpcTransportSecurity(security_quality_of_service));
}
/// <summary>
/// Connect the client to a RPC endpoint.
/// </summary>
/// <param name="string_binding">The binding string for the RPC server.</param>
/// <param name="transport_security">The transport security for the connection.</param>
public void Connect(string string_binding, RpcTransportSecurity transport_security)
{
var endpoint = new RpcEndpoint(InterfaceId, InterfaceVersion, string_binding, false);
if (string.IsNullOrEmpty(endpoint.ProtocolSequence))
{
throw new ArgumentException("Binding string must contain a protocol sequence.");
}
if (string.IsNullOrEmpty(endpoint.Endpoint))
{
endpoint = LookupEndpoint(string_binding);
}
Connect(endpoint, transport_security);
}
/// <summary>
/// Connect the client to an ALPC RPC port.
/// </summary>
/// <param name="alpc_path">The path to the ALPC RPC port. If an empty string the endpoint will be looked up in the endpoint mapper.</param>
public void Connect(string alpc_path)
{
Connect(alpc_path, null);
}
/// <summary>
/// Connect the client to an ALPC RPC port.
/// </summary>
/// <remarks>The ALPC endpoint will be looked up in the endpoint mapper.</remarks>
public void Connect()
{
Connect(null);
}
/// <summary>
/// Dispose of the client.
/// </summary>
public virtual void Dispose()
{
_transport?.Dispose();
}
/// <summary>
/// Disconnect the client.
/// </summary>
public void Disconnect()
{
_transport?.Disconnect();
}
#endregion
}
}
| 40.919753 | 149 | 0.599789 | [
"Apache-2.0"
] | 0x09AL/sandbox-attacksurface-analysis-tools | NtApiDotNet/Win32/Rpc/RpcClientBase.cs | 13,260 | C# |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.AzureNative.Devices.V20190701Preview
{
public static class GetIotHubResourceEventHubConsumerGroup
{
/// <summary>
/// The properties of the EventHubConsumerGroupInfo object.
/// </summary>
public static Task<GetIotHubResourceEventHubConsumerGroupResult> InvokeAsync(GetIotHubResourceEventHubConsumerGroupArgs args, InvokeOptions? options = null)
=> Pulumi.Deployment.Instance.InvokeAsync<GetIotHubResourceEventHubConsumerGroupResult>("azure-native:devices/v20190701preview:getIotHubResourceEventHubConsumerGroup", args ?? new GetIotHubResourceEventHubConsumerGroupArgs(), options.WithVersion());
}
public sealed class GetIotHubResourceEventHubConsumerGroupArgs : Pulumi.InvokeArgs
{
/// <summary>
/// The name of the Event Hub-compatible endpoint in the IoT hub.
/// </summary>
[Input("eventHubEndpointName", required: true)]
public string EventHubEndpointName { get; set; } = null!;
/// <summary>
/// The name of the consumer group to retrieve.
/// </summary>
[Input("name", required: true)]
public string Name { get; set; } = null!;
/// <summary>
/// The name of the resource group that contains the IoT hub.
/// </summary>
[Input("resourceGroupName", required: true)]
public string ResourceGroupName { get; set; } = null!;
/// <summary>
/// The name of the IoT hub.
/// </summary>
[Input("resourceName", required: true)]
public string ResourceName { get; set; } = null!;
public GetIotHubResourceEventHubConsumerGroupArgs()
{
}
}
[OutputType]
public sealed class GetIotHubResourceEventHubConsumerGroupResult
{
/// <summary>
/// The etag.
/// </summary>
public readonly string Etag;
/// <summary>
/// The Event Hub-compatible consumer group identifier.
/// </summary>
public readonly string Id;
/// <summary>
/// The Event Hub-compatible consumer group name.
/// </summary>
public readonly string Name;
/// <summary>
/// The tags.
/// </summary>
public readonly ImmutableDictionary<string, string> Properties;
/// <summary>
/// the resource type.
/// </summary>
public readonly string Type;
[OutputConstructor]
private GetIotHubResourceEventHubConsumerGroupResult(
string etag,
string id,
string name,
ImmutableDictionary<string, string> properties,
string type)
{
Etag = etag;
Id = id;
Name = name;
Properties = properties;
Type = type;
}
}
}
| 32.183673 | 261 | 0.613824 | [
"Apache-2.0"
] | polivbr/pulumi-azure-native | sdk/dotnet/Devices/V20190701Preview/GetIotHubResourceEventHubConsumerGroup.cs | 3,154 | C# |
// Copyright 2021-2022 Nikita Fediuchin. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
using System.Runtime.InteropServices;
namespace Pack
{
public static class PackWriter
{
[DllImport(Pack.Lib)] private static extern PackResult packFiles(
string packPath, ulong fileCount, string[] filePaths, bool printProgress);
public static PackResult PackFiles(
string packPath, string[] filePaths, bool printProgress)
{
if (string.IsNullOrEmpty(packPath))
throw new ArgumentNullException(nameof(packPath));
if (filePaths.Length == 0)
throw new ArgumentNullException(nameof(filePaths));
return packFiles(packPath, (ulong)filePaths.Length, filePaths, printProgress);
}
}
}
| 37.444444 | 90 | 0.696588 | [
"Apache-2.0"
] | cfnptr/pack | wrappers/csharp/PackWriter.cs | 1,348 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UsingStructs
{
internal class Coffee
{
//public Coffee()
//{
// Name = "Coffee";
//}
public string Name { get; set; }
public string Bean { get; set; }
public string CountyOfOrigin { get; set; }
public int Strength { get; set; }
}
class Program
{
static void Main(string[] args)
{
var coffee1 = new Coffee();
coffee1.Strength = 3;
coffee1.Name = "Fourth Coffee Quencher";
coffee1.CountyOfOrigin = "Indonesia";
//coffee1.
Console.WriteLine("Name: {0}", coffee1.Name);
Console.WriteLine("Country of Origin: {0}", coffee1.CountyOfOrigin);
Console.WriteLine("Strength: {0}", coffee1.Strength);
}
}
}
| 23.475 | 80 | 0.553781 | [
"MIT"
] | skiryazov/20483-extended-demos | 20483C_04_demos/3. UnitTest/DemoStart/UsingStructs/Program.cs | 941 | C# |
namespace Core.Module.Player
{
public enum SystemMessageId
{
///<summary>You have been disconnected from the server.</summary>
YouHaveBeenDisconnected = 0,
///<summary>The server will be coming down in $1 seconds. Please find a safe place to log out.</summary>
TheServerWillBeComingDownInS1Seconds = 1,
///<summary>$s1 does not exist.</summary>
S1DoesNotExist = 2,
///<summary>$s1 is not currently logged in.</summary>
S1IsNotOnline = 3,
///<summary>You cannot ask yourself to apply to a clan.</summary>
CannotInviteYourself = 4,
///<summary>$s1 already exists.</summary>
S1AlreadyExists = 5,
///<summary>$s1 does not exist.</summary>
S1DoesNotExist2 = 6,
///<summary>You are already a member of $s1.</summary>
AlreadyMemberOfS1 = 7,
///<summary>You are working with another clan.</summary>
YouAreWorkingWithAnotherClan = 8,
///<summary>$s1 is not a clan leader.</summary>
S1IsNotAClanLeader = 9,
///<summary>$s1 is working with another clan.</summary>
S1WorkingWithAnotherClan = 10,
///<summary>There are no applicants for this clan.</summary>
NoApplicantsForThisClan = 11,
///<summary>The applicant information is incorrect.</summary>
ApplicantInformationIncorrect = 12,
///<summary>Unable to disperse: your clan has requested to participate in a castle siege.</summary>
CannotDissolveCauseClanWillParticipateInCastleSiege = 13,
///<summary>Unable to disperse: your clan owns one or more castles or hideouts.</summary>
CannotDissolveCauseClanOwnsCastlesHideouts = 14,
///<summary>You are in siege.</summary>
YouAreInSiege = 15,
///<summary>You are not in siege.</summary>
YouAreNotInSiege = 16,
///<summary>The castle siege has begun.</summary>
CastleSiegeHasBegun = 17,
///<summary>The castle siege has ended.</summary>
CastleSiegeHasEnded = 18,
///<summary>There is a new Lord of the castle!.</summary>
NewCastleLord = 19,
///<summary>The gate is being opened.</summary>
GateIsOpening = 20,
///<summary>The gate is being destroyed.</summary>
GateIsDestroyed = 21,
///<summary>Your target is out of range.</summary>
TargetTooFar = 22,
///<summary>Not enough HP.</summary>
NotEnoughHp = 23,
///<summary>Not enough MP.</summary>
NotEnoughMp = 24,
///<summary>Rejuvenating HP.</summary>
RejuvenatingHp = 25,
///<summary>Rejuvenating MP.</summary>
RejuvenatingMp = 26,
///<summary>Your casting has been interrupted.</summary>
CastingInterrupted = 27,
///<summary>You have obtained $s1 adena.</summary>
YouPickedUpS1Adena = 28,
///<summary>You have obtained $s2 $s1.</summary>
YouPickedUpS2S1 = 29,
///<summary>You have obtained $s1.</summary>
YouPickedUpS1 = 30,
///<summary>You cannot move while sitting.</summary>
CantMoveSitting = 31,
///<summary>You are unable to engage in combat. Please go to the nearest restart point.</summary>
UnableCombatPleaseGoRestart = 32,
///<summary>You cannot move while casting.</summary>
CantMoveCasting = 32,
///<summary>Welcome to the World of Lineage II.</summary>
WelcomeToLineage = 34,
///<summary>You hit for $s1 damage.</summary>
YouDidS1Dmg = 35,
///<summary>$s1 hit you for $s2 damage.</summary>
S1GaveYouS2Dmg = 36,
///<summary>$s1 hit you for $s2 damage.</summary>
S1GaveYouS2Dmg2 = 37,
///<summary>You carefully nock an arrow.</summary>
GettingReadyToShootAnArrow = 41,
///<summary>You have avoided $s1's attack.</summary>
AvoidedS1Attack = 42,
///<summary>You have missed.</summary>
MissedTarget = 43,
///<summary>Critical hit!.</summary>
CriticalHit = 44,
///<summary>You have earned $s1 experience.</summary>
EarnedS1Experience = 45,
///<summary>You use $s1.</summary>
UseS1 = 46,
///<summary>You begin to use a(n) $s1.</summary>
BeginToUseS1 = 47,
///<summary>$s1 is not available at this time: being prepared for reuse.</summary>
S1PreparedForReuse = 48,
///<summary>You have equipped your $s1.</summary>
S1Equipped = 49,
///<summary>Your target cannot be found.</summary>
TargetCantFound = 50,
///<summary>You cannot use this on yourself.</summary>
CannotUseOnYourself = 51,
///<summary>You have earned $s1 adena.</summary>
EarnedS1Adena = 52,
///<summary>You have earned $s2 $s1(s).</summary>
EarnedS2S1S = 53,
///<summary>You have earned $s1.</summary>
EarnedItemS1 = 54,
///<summary>You have failed to pick up $s1 adena.</summary>
FailedToPickupS1Adena = 55,
///<summary>You have failed to pick up $s1.</summary>
FailedToPickupS1 = 56,
///<summary>You have failed to pick up $s2 $s1(s).</summary>
FailedToPickupS2S1S = 57,
///<summary>You have failed to earn $s1 adena.</summary>
FailedToEarnS1Adena = 58,
///<summary>You have failed to earn $s1.</summary>
FailedToEarnS1 = 59,
///<summary>You have failed to earn $s2 $s1(s).</summary>
FailedToEarnS2S1S = 60,
///<summary>Nothing happened.</summary>
NothingHappened = 61,
///<summary>Your $s1 has been successfully enchanted.</summary>
S1SuccessfullyEnchanted = 62,
///<summary>Your +$S1 $S2 has been successfully enchanted.</summary>
S1S2SuccessfullyEnchanted = 63,
///<summary>The enchantment has failed! Your $s1 has been crystallized.</summary>
EnchantmentFailedS1Evaporated = 64,
///<summary>The enchantment has failed! Your +$s1 $s2 has been crystallized.</summary>
EnchantmentFailedS1S2Evaporated = 65,
///<summary>$s1 is inviting you to join a party. Do you accept?.</summary>
S1InvitedYouToParty = 66,
///<summary>$s1 has invited you to the join the clan, $s2. Do you wish to join?.</summary>
S1HasInvitedYouToJoinTheClanS2 = 67,
///<summary>Would you like to withdraw from the $s1 clan? If you leave, you will have to wait at least a day before joining another clan.</summary>
WouldYouLikeToWithdrawFromTheS1Clan = 68,
///<summary>Would you like to dismiss $s1 from the clan? If you do so, you will have to wait at least a day before accepting a new member.</summary>
WouldYouLikeToDismissS1FromTheClan = 69,
///<summary>Do you wish to disperse the clan, $s1?.</summary>
DoYouWishToDisperseTheClanS1 = 70,
///<summary>How many of your $s1(s) do you wish to discard?.</summary>
HowManyS1Discard = 71,
///<summary>How many of your $s1(s) do you wish to move?.</summary>
HowManyS1Move = 72,
///<summary>How many of your $s1(s) do you wish to destroy?.</summary>
HowManyS1Destroy = 73,
///<summary>Do you wish to destroy your $s1?.</summary>
WishDestroyS1 = 74,
///<summary>ID does not exist.</summary>
IdNotExist = 75,
///<summary>Incorrect password.</summary>
IncorrectPassword = 76,
///<summary>You cannot create another character. Please delete the existing character and try again.</summary>
CannotCreateCharacter = 77,
///<summary>When you delete a character, any items in his/her possession will also be deleted. Do you really wish to delete $s1%?.</summary>
WishDeleteS1 = 78,
///<summary>This name already exists.</summary>
NamingNameAlreadyExists = 79,
///<summary>Names must be between 1-16 characters, excluding spaces or special characters.</summary>
NamingCharnameUpTo16Chars = 80,
///<summary>Please select your race.</summary>
PleaseSelectRace = 81,
///<summary>Please select your occupation.</summary>
PleaseSelectOccupation = 82,
///<summary>Please select your gender.</summary>
PleaseSelectGender = 83,
///<summary>You may not attack in a peaceful zone.</summary>
CantAtkPeacezone = 84,
///<summary>You may not attack this target in a peaceful zone.</summary>
TargetInPeacezone = 85,
///<summary>Please enter your ID.</summary>
PleaseEnterId = 86,
///<summary>Please enter your password.</summary>
PleaseEnterPassword = 87,
///<summary>Your protocol version is different, please restart your client and run a full check.</summary>
WrongProtocolCheck = 88,
///<summary>Your protocol version is different, please continue.</summary>
WrongProtocolContinue = 89,
///<summary>You are unable to connect to the server.</summary>
UnableToConnect = 90,
///<summary>Please select your hairstyle.</summary>
PleaseSelectHairStyle = 91,
///<summary>$s1 has worn off.</summary>
S1HasWornOff = 92,
///<summary>You do not have enough SP for this.</summary>
NotEnoughSp = 93,
///<summary>2004-2009 (c) Copyright NCsoft Corporation. All Rights Reserved.</summary>
Copyright = 94,
///<summary>You have earned $s1 experience and $s2 SP.</summary>
YouEarnedS1ExpAndS2Sp = 95,
///<summary>Your level has increased!.</summary>
YouIncreasedYourLevel = 96,
///<summary>This item cannot be moved.</summary>
CannotMoveThisItem = 97,
///<summary>This item cannot be discarded.</summary>
CannotDiscardThisItem = 98,
///<summary>This item cannot be traded or sold.</summary>
CannotTradeThisItem = 99,
///<summary>$s1 is requesting to trade. Do you wish to continue?.</summary>
S1RequestsTrade = 100,
///<summary>You cannot exit while in combat.</summary>
CantLogoutWhileFighting = 101,
///<summary>You cannot restart while in combat.</summary>
CantRestartWhileFighting = 102,
///<summary>This ID is currently logged in.</summary>
IdLoggedIn = 103,
///<summary>You may not equip items while casting or performing a skill.</summary>
CannotUseItemWhileUsingMagic = 104,
///<summary>You have invited $s1 to your party.</summary>
YouInvitedS1ToParty = 105,
///<summary>You have joined $s1's party.</summary>
YouJoinedS1Party = 106,
///<summary>$s1 has joined the party.</summary>
S1JoinedParty = 107,
///<summary>$s1 has left the party.</summary>
S1LeftParty = 108,
///<summary>Invalid target.</summary>
IncorrectTarget = 109,
///<summary>$s1 $s2's effect can be felt.</summary>
YouFeelS1Effect = 110,
///<summary>Your shield defense has succeeded.</summary>
ShieldDefenceSuccessfull = 111,
///<summary>You may no longer adjust items in the trade because the trade has been confirmed.</summary>
NotEnoughArrows = 112,
///<summary>$s1 cannot be used due to unsuitable terms.</summary>
S1CannotBeUsed = 113,
///<summary>You have entered the shadow of the Mother Tree.</summary>
EnterShadowMotherTree = 114,
///<summary>You have left the shadow of the Mother Tree.</summary>
ExitShadowMotherTree = 115,
///<summary>You have entered a peaceful zone.</summary>
EnterPeacefulZone = 116,
///<summary>You have left the peaceful zone.</summary>
ExitPeacefulZone = 117,
///<summary>You have requested a trade with $s1.</summary>
RequestS1ForTrade = 118,
///<summary>$s1 has denied your request to trade.</summary>
S1DeniedTradeRequest = 119,
///<summary>You begin trading with $s1.</summary>
BeginTradeWithS1 = 120,
///<summary>$s1 has confirmed the trade.</summary>
S1ConfirmedTrade = 121,
///<summary>You may no longer adjust items in the trade because the trade has been confirmed.</summary>
CannotAdjustItemsAfterTradeConfirmed = 122,
///<summary>Your trade is successful.</summary>
TradeSuccessful = 123,
///<summary>$s1 has cancelled the trade.</summary>
S1CanceledTrade = 124,
///<summary>Do you wish to exit the game?.</summary>
WishExitGame = 125,
///<summary>Do you wish to return to the character select screen?.</summary>
WishRestartGame = 126,
///<summary>You have been disconnected from the server. Please login again.</summary>
DisconnectedFromServer = 127,
///<summary>Your character creation has failed.</summary>
CharacterCreationFailed = 128,
///<summary>Your inventory is full.</summary>
SlotsFull = 129,
///<summary>Your warehouse is full.</summary>
WarehouseFull = 130,
///<summary>$s1 has logged in.</summary>
S1LoggedIn = 131,
///<summary>$s1 has been added to your friends list.</summary>
S1AddedToFriends = 132,
///<summary>$s1 has been removed from your friends list.</summary>
S1RemovedFromYourFriendsList = 133,
///<summary>Please check your friends list again.</summary>
PleaceCheckYourFriendListAgain = 134,
///<summary>$s1 did not reply to your invitation. Your invitation has been cancelled.</summary>
S1DidNotReplyToYourInvite = 135,
///<summary>You have not replied to $s1's invitation. The offer has been cancelled.</summary>
YouDidNotReplyToS1Invite = 136,
///<summary>There are no more items in the shortcut.</summary>
NoMoreItemsShortcut = 137,
///<summary>Designate shortcut.</summary>
DesignateShortcut = 138,
///<summary>$s1 has resisted your $s2.</summary>
S1ResistedYourS2 = 139,
///<summary>Your skill was removed due to a lack of MP.</summary>
SkillRemovedDueLackMp = 140,
///<summary>Once the trade is confirmed, the item cannot be moved again.</summary>
OnceTheTradeIsConfirmedTheItemCannotBeMovedAgain = 141,
///<summary>You are already trading with someone.</summary>
AlreadyTrading = 142,
///<summary>$s1 is already trading with another person. Please try again later.</summary>
S1AlreadyTrading = 143,
///<summary>That is the incorrect target.</summary>
TargetIsIncorrect = 144,
///<summary>That player is not online.</summary>
TargetIsNotFoundInTheGame = 145,
///<summary>Chatting is now permitted.</summary>
ChattingPermitted = 146,
///<summary>Chatting is currently prohibited.</summary>
ChattingProhibited = 147,
///<summary>You cannot use quest items.</summary>
CannotUseQuestItems = 148,
///<summary>You cannot pick up or use items while trading.</summary>
CannotPickupOrUseItemWhileTrading = 149,
///<summary>You cannot discard or destroy an item while trading at a private store.</summary>
CannotDiscardOrDestroyItemWhileTrading = 150,
///<summary>That is too far from you to discard.</summary>
CannotDiscardDistanceTooFar = 151,
///<summary>You have invited the wrong target.</summary>
YouHaveInvitedTheWrongTarget = 152,
///<summary>$s1 is on another task. Please try again later.</summary>
S1IsBusyTryLater = 153,
///<summary>Only the leader can give out invitations.</summary>
OnlyLeaderCanInvite = 154,
///<summary>The party is full.</summary>
PartyFull = 155,
///<summary>Drain was only 50 percent successful.</summary>
DrainHalfSuccesful = 156,
///<summary>You resisted $s1's drain.</summary>
ResistedS1Drain = 157,
///<summary>Your attack has failed.</summary>
AttackFailed = 158,
///<summary>You resisted $s1's magic.</summary>
ResistedS1Magic = 159,
///<summary>$s1 is a member of another party and cannot be invited.</summary>
S1IsAlreadyInParty = 160,
///<summary>That player is not currently online.</summary>
InvitedUserNotOnline = 161,
///<summary>Warehouse is too far.</summary>
WarehouseTooFar = 162,
///<summary>You cannot destroy it because the number is incorrect.</summary>
CannotDestroyNumberIncorrect = 163,
///<summary>Waiting for another reply.</summary>
WaitingForAnotherReply = 164,
///<summary>You cannot add yourself to your own friend list.</summary>
YouCannotAddYourselfToOwnFriendList = 165,
///<summary>Friend list is not ready yet. Please register again later.</summary>
FriendListNotReadyYetRegisterLater = 166,
///<summary>$s1 is already on your friend list.</summary>
S1AlreadyOnFriendList = 167,
///<summary>$s1 has sent a friend request.</summary>
S1RequestedToBecomeFriends = 168,
///<summary>Accept friendship 0/1 (1 to accept, 0 to deny).</summary>
AcceptTheFriendship = 169,
///<summary>The user who requested to become friends is not found in the game.</summary>
TheUserYouRequestedIsNotInGame = 170,
///<summary>$s1 is not on your friend list.</summary>
S1NotOnYourFriendsList = 171,
///<summary>You lack the funds needed to pay for this transaction.</summary>
LackFundsForTransaction1 = 172,
///<summary>You lack the funds needed to pay for this transaction.</summary>
LackFundsForTransaction2 = 173,
///<summary>That person's inventory is full.</summary>
OtherInventoryFull = 174,
///<summary>That skill has been de-activated as HP was fully recovered.</summary>
SkillDeactivatedHpFull = 175,
///<summary>That person is in message refusal mode.</summary>
ThePersonIsInMessageRefusalMode = 176,
///<summary>Message refusal mode.</summary>
MessageRefusalMode = 177,
///<summary>Message acceptance mode.</summary>
MessageAcceptanceMode = 178,
///<summary>You cannot discard those items here.</summary>
CantDiscardHere = 179,
///<summary>You have $s1 day(s) left until deletion. Do you wish to cancel this action?.</summary>
S1DaysLeftCancelAction = 180,
///<summary>Cannot see target.</summary>
CantSeeTarget = 181,
///<summary>Do you want to quit the current quest?.</summary>
WantQuitCurrentQuest = 182,
///<summary>There are too many users on the server. Please try again later.</summary>
TooManyUsers = 183,
///<summary>Please try again later.</summary>
TryAgainLater = 184,
///<summary>You must first select a user to invite to your party.</summary>
FirstSelectUserToInviteToParty = 185,
///<summary>You must first select a user to invite to your clan.</summary>
FirstSelectUserToInviteToClan = 186,
///<summary>Select user to expel.</summary>
SelectUserToExpel = 187,
///<summary>Please create your clan name.</summary>
PleaseCreateClanName = 188,
///<summary>Your clan has been created.</summary>
ClanCreated = 189,
///<summary>You have failed to create a clan.</summary>
FailedToCreateClan = 190,
///<summary>Clan member $s1 has been expelled.</summary>
ClanMemberS1Expelled = 191,
///<summary>You have failed to expel $s1 from the clan.</summary>
FailedExpelS1 = 192,
///<summary>Clan has dispersed.</summary>
ClanHasDispersed = 193,
///<summary>You have failed to disperse the clan.</summary>
FailedToDisperseClan = 194,
///<summary>Entered the clan.</summary>
EnteredTheClan = 195,
///<summary>$s1 declined your clan invitation.</summary>
S1RefusedToJoinClan = 196,
///<summary>You have withdrawn from the clan.</summary>
YouHaveWithdrawnFromClan = 197,
///<summary>You have failed to withdraw from the $s1 clan.</summary>
FailedToWithdrawFromS1Clan = 198,
///<summary>You have recently been dismissed from a clan. You are not allowed to join another clan for 24-hours.</summary>
ClanMembershipTerminated = 199,
///<summary>You have withdrawn from the party.</summary>
YouLeftParty = 200,
///<summary>$s1 was expelled from the party.</summary>
S1WasExpelledFromParty = 201,
///<summary>You have been expelled from the party.</summary>
HaveBeenExpelledFromParty = 202,
///<summary>The party has dispersed.</summary>
PartyDispersed = 203,
///<summary>Incorrect name. Please try again.</summary>
IncorrectNameTryAgain = 204,
///<summary>Incorrect character name. Please try again.</summary>
IncorrectCharacterNameTryAgain = 205,
///<summary>Please enter the name of the clan you wish to declare war on.</summary>
EnterClanNameToDeclareWar = 206,
///<summary>$s2 of the clan $s1 requests declaration of war. Do you accept?.</summary>
S2OfTheClanS1RequestsWar = 207,
///<summary>You are not a clan member and cannot perform this action.</summary>
YouAreNotAClanMember = 212,
///<summary>Not working. Please try again later.</summary>
NotWorkingPleaseTryAgainLater = 213,
///<summary>Your title has been changed.</summary>
TitleChanged = 214,
///<summary>War with the $s1 clan has begun.</summary>
WarWithTheS1ClanHasBegun = 215,
///<summary>War with the $s1 clan has ended.</summary>
WarWithTheS1ClanHasEnded = 216,
///<summary>You have won the war over the $s1 clan!.</summary>
YouHaveWonTheWarOverTheS1Clan = 217,
///<summary>You have surrendered to the $s1 clan.</summary>
YouHaveSurrenderedToTheS1Clan = 218,
///<summary>Your clan leader has died. You have been defeated by the $s1 clan.</summary>
YouWereDefeatedByS1Clan = 219,
///<summary>You have $s1 minutes left until the clan war ends.</summary>
S1MinutesLeftUntilClanWarEnds = 220,
///<summary>The time limit for the clan war is up. War with the $s1 clan is over.</summary>
ClanWarWithS1ClanHasEnded = 221,
///<summary>$s1 has joined the clan.</summary>
S1HasJoinedClan = 222,
///<summary>$s1 has withdrawn from the clan.</summary>
S1HasWithdrawnFromTheClan = 223,
///<summary>$s1 did not respond: Invitation to the clan has been cancelled.</summary>
S1DidNotRespondToClanInvitation = 224,
///<summary>You didn't respond to $s1's invitation: joining has been cancelled.</summary>
YouDidNotRespondToS1ClanInvitation = 225,
///<summary>The $s1 clan did not respond: war proclamation has been refused.</summary>
S1ClanDidNotRespond = 226,
///<summary>Clan war has been refused because you did not respond to $s1 clan's war proclamation.</summary>
ClanWarRefusedYouDidNotRespondToS1 = 227,
///<summary>Request to end war has been denied.</summary>
RequestToEndWarHasBeenDenied = 228,
///<summary>You do not meet the criteria in order to create a clan.</summary>
YouDoNotMeetCriteriaInOrderToCreateAClan = 229,
///<summary>You must wait 10 days before creating a new clan.</summary>
YouMustWaitXxDaysBeforeCreatingANewClan = 230,
///<summary>After a clan member is dismissed from a clan, the clan must wait at least a day before accepting a new member.</summary>
YouMustWaitBeforeAcceptingANewMember = 231,
///<summary>After leaving or having been dismissed from a clan, you must wait at least a day before joining another clan.</summary>
YouMustWaitBeforeJoiningAnotherClan = 232,
///<summary>The Academy/Royal Guard/Order of Knights is full and cannot accept new members at this time.</summary>
SubclanIsFull = 233,
///<summary>The target must be a clan member.</summary>
TargetMustBeInClan = 234,
///<summary>You are not authorized to bestow these rights.</summary>
NotAuthorizedToBestowRights = 235,
///<summary>Only the clan leader is enabled.</summary>
OnlyTheClanLeaderIsEnabled = 236,
///<summary>The clan leader could not be found.</summary>
ClanLeaderNotFound = 237,
///<summary>Not joined in any clan.</summary>
NotJoinedInAnyClan = 238,
///<summary>The clan leader cannot withdraw.</summary>
ClanLeaderCannotWithdraw = 239,
///<summary>Currently involved in clan war.</summary>
CurrentlyInvolvedInClanWar = 240,
///<summary>Leader of the $s1 Clan is not logged in.</summary>
LeaderOfS1ClanNotFound = 241,
///<summary>Select target.</summary>
SelectTarget = 242,
///<summary>You cannot declare war on an allied clan.</summary>
CannotDeclareWarOnAlliedClan = 243,
///<summary>You are not allowed to issue this challenge.</summary>
NotAllowedToChallenge = 244,
///<summary>5 days has not passed since you were refused war. Do you wish to continue?.</summary>
FiveDaysNotPassedSinceRefusedWar = 245,
///<summary>That clan is currently at war.</summary>
ClanCurrentlyAtWar = 246,
///<summary>You have already been at war with the $s1 clan: 5 days must pass before you can challenge this clan again.</summary>
FiveDaysMustPassBeforeChallengeS1Again = 247,
///<summary>You cannot proclaim war: the $s1 clan does not have enough members.</summary>
S1ClanNotEnoughMembersForWar = 248,
///<summary>Do you wish to surrender to the $s1 clan?.</summary>
WishSurrenderToS1Clan = 249,
///<summary>You have personally surrendered to the $s1 clan. You are no longer participating in this clan war.</summary>
YouHavePersonallySurrenderedToTheS1Clan = 250,
///<summary>You cannot proclaim war: you are at war with another clan.</summary>
AlreadyAtWarWithAnotherClan = 251,
///<summary>Enter the clan name to surrender to.</summary>
EnterClanNameToSurrenderTo = 252,
///<summary>Enter the name of the clan you wish to end the war with.</summary>
EnterClanNameToEndWar = 253,
///<summary>A clan leader cannot personally surrender.</summary>
LeaderCantPersonallySurrender = 254,
///<summary>The $s1 clan has requested to end war. Do you agree?.</summary>
S1ClanRequestedEndWar = 255,
///<summary>Enter title.</summary>
EnterTitle = 256,
///<summary>Do you offer the $s1 clan a proposal to end the war?.</summary>
DoYouOfferS1ClanEndWar = 257,
///<summary>You are not involved in a clan war.</summary>
NotInvolvedClanWar = 258,
///<summary>Select clan members from list.</summary>
SelectMembersFromList = 259,
///<summary>Fame level has decreased: 5 days have not passed since you were refused war.</summary>
FiveDaysNotPassedSinceYouWereRefusedWar = 260,
///<summary>Clan name is invalid.</summary>
ClanNameInvalid = 261,
///<summary>Clan name's length is incorrect.</summary>
ClanNameLengthIncorrect = 262,
///<summary>You have already requested the dissolution of your clan.</summary>
DissolutionInProgress = 263,
///<summary>You cannot dissolve a clan while engaged in a war.</summary>
CannotDissolveWhileInWar = 264,
///<summary>You cannot dissolve a clan during a siege or while protecting a castle.</summary>
CannotDissolveWhileInSiege = 265,
///<summary>You cannot dissolve a clan while owning a clan hall or castle.</summary>
CannotDissolveWhileOwningClanHallOrCastle = 266,
///<summary>There are no requests to disperse.</summary>
NoRequestsToDisperse = 267,
///<summary>That player already belongs to another clan.</summary>
PlayerAlreadyAnotherClan = 268,
///<summary>You cannot dismiss yourself.</summary>
YouCannotDismissYourself = 269,
///<summary>You have already surrendered.</summary>
YouHaveAlreadySurrendered = 270,
///<summary>A player can only be granted a title if the clan is level 3 or above.</summary>
ClanLvl3NeededToEndoweTitle = 271,
///<summary>A clan crest can only be registered when the clan's skill level is 3 or above.</summary>
ClanLvl3NeededToSetCrest = 272,
///<summary>A clan war can only be declared when a clan's skill level is 3 or above.</summary>
ClanLvl3NeededToDeclareWar = 273,
///<summary>Your clan's skill level has increased.</summary>
ClanLevelIncreased = 274,
///<summary>Clan has failed to increase skill level.</summary>
ClanLevelIncreaseFailed = 275,
///<summary>You do not have the necessary materials or prerequisites to learn this skill.</summary>
ItemMissingToLearnSkill = 276,
///<summary>You have earned $s1.</summary>
LearnedSkillS1 = 277,
///<summary>You do not have enough SP to learn this skill.</summary>
NotEnoughSpToLearnSkill = 278,
///<summary>You do not have enough adena.</summary>
YouNotEnoughAdena = 279,
///<summary>You do not have any items to sell.</summary>
NoItemsToSell = 280,
///<summary>You do not have enough adena to pay the fee.</summary>
YouNotEnoughAdenaPayFee = 281,
///<summary>You have not deposited any items in your warehouse.</summary>
NoItemDepositedInWh = 282,
///<summary>You have entered a combat zone.</summary>
EnteredCombatZone = 283,
///<summary>You have left a combat zone.</summary>
LeftCombatZone = 284,
///<summary>Clan $s1 has succeeded in engraving the ruler!.</summary>
ClanS1EngravedRuler = 285,
///<summary>Your base is being attacked.</summary>
BaseUnderAttack = 286,
///<summary>The opposing clan has stared to engrave to monument!.</summary>
OpponentStartedEngraving = 287,
///<summary>The castle gate has been broken down.</summary>
CastleGateBrokenDown = 288,
///<summary>An outpost or headquarters cannot be built because at least one already exists.</summary>
NotAnotherHeadquarters = 289,
///<summary>You cannot set up a base here.</summary>
NotSetUpBaseHere = 290,
///<summary>Clan $s1 is victorious over $s2's castle siege!.</summary>
ClanS1VictoriousOverS2SSiege = 291,
///<summary>$s1 has announced the castle siege time.</summary>
S1AnnouncedSiegeTime = 292,
///<summary>The registration term for $s1 has ended.</summary>
RegistrationTermForS1Ended = 293,
///<summary>Because your clan is not currently on the offensive in a Clan Hall siege war, it cannot summon its base camp.</summary>
BecauseYourClanIsNotCurrentlyOnTheOffensiveInAClanHallSiegeWarItCannotSummonItsBaseCamp = 294,
///<summary>$s1's siege was canceled because there were no clans that participated.</summary>
S1SiegeWasCanceledBecauseNoClansParticipated = 295,
///<summary>You received $s1 damage from taking a high fall.</summary>
FallDamageS1 = 296,
///<summary>You have taken $s1 damage because you were unable to breathe.</summary>
DrownDamageS1 = 297,
///<summary>You have dropped $s1.</summary>
YouDroppedS1 = 298,
///<summary>$s1 has obtained $s3 $s2.</summary>
S1ObtainedS3S2 = 299,
///<summary>$s1 has obtained $s2.</summary>
S1ObtainedS2 = 300,
///<summary>$s2 $s1 has disappeared.</summary>
S2S1Disappeared = 301,
///<summary>$s1 has disappeared.</summary>
S1Disappeared = 302,
///<summary>Select item to enchant.</summary>
SelectItemToEnchant = 303,
///<summary>Clan member $s1 has logged into game.</summary>
ClanMemberS1LoggedIn = 304,
///<summary>The player declined to join your party.</summary>
PlayerDeclined = 305,
///<summary>You have succeeded in expelling the clan member.</summary>
YouHaveSucceededInExpellingClanMember = 309,
///<summary>The clan war declaration has been accepted.</summary>
ClanWarDeclarationAccepted = 311,
///<summary>The clan war declaration has been refused.</summary>
ClanWarDeclarationRefused = 312,
///<summary>The cease war request has been accepted.</summary>
CeaseWarRequestAccepted = 313,
///<summary>You have failed to surrender.</summary>
FailedToSurrender = 314,
///<summary>You have failed to personally surrender.</summary>
FailedToPersonallySurrender = 315,
///<summary>You have failed to withdraw from the party.</summary>
FailedToWithdrawFromTheParty = 316,
///<summary>You have failed to expel the party member.</summary>
FailedToExpelThePartyMember = 317,
///<summary>You have failed to disperse the party.</summary>
FailedToDisperseTheParty = 318,
///<summary>This door cannot be unlocked.</summary>
UnableToUnlockDoor = 319,
///<summary>You have failed to unlock the door.</summary>
FailedToUnlockDoor = 320,
///<summary>It is not locked.</summary>
ItsNotLocked = 321,
///<summary>Please decide on the sales price.</summary>
DecideSalesPrice = 322,
///<summary>Your force has increased to $s1 level.</summary>
ForceIncreasedToS1 = 323,
///<summary>Your force has reached maximum capacity.</summary>
ForceMaxlevelReached = 324,
///<summary>The corpse has already disappeared.</summary>
CorpseAlreadyDisappeared = 325,
///<summary>Select target from list.</summary>
SelectTargetFromList = 326,
///<summary>You cannot exceed 80 characters.</summary>
CannotExceed80Characters = 327,
///<summary>Please input title using less than 128 characters.</summary>
PleaseInputTitleLess128Characters = 328,
///<summary>Please input content using less than 3000 characters.</summary>
PleaseInputContentLess3000Characters = 329,
///<summary>A one-line response may not exceed 128 characters.</summary>
OneLineResponseNotExceed128Characters = 330,
///<summary>You have acquired $s1 SP.</summary>
AcquiredS1Sp = 331,
///<summary>Do you want to be restored?.</summary>
DoYouWantToBeRestored = 332,
///<summary>You have received $s1 damage by Core's barrier.</summary>
S1DamageByCoreBarrier = 333,
///<summary>Please enter your private store display message.</summary>
EnterPrivateStoreMessage = 334,
///<summary>$s1 has been aborted.</summary>
S1HasBeenAborted = 335,
///<summary>You are attempting to crystallize $s1. Do you wish to continue?.</summary>
WishToCrystallizeS1 = 336,
///<summary>The soulshot you are attempting to use does not match the grade of your equipped weapon.</summary>
SoulshotsGradeMismatch = 337,
///<summary>You do not have enough soulshots for that.</summary>
NotEnoughSoulshots = 338,
///<summary>Cannot use soulshots.</summary>
CannotUseSoulshots = 339,
///<summary>Your private store is now open for business.</summary>
PrivateStoreUnderWay = 340,
///<summary>You do not have enough materials to perform that action.</summary>
NotEnoughMaterials = 341,
///<summary>Power of the spirits enabled.</summary>
EnabledSoulshot = 342,
///<summary>Sweeper failed, target not spoiled.</summary>
SweeperFailedTargetNotSpoiled = 343,
///<summary>Power of the spirits disabled.</summary>
SoulshotsDisabled = 344,
///<summary>Chat enabled.</summary>
ChatEnabled = 345,
///<summary>Chat disabled.</summary>
ChatDisabled = 346,
///<summary>Incorrect item count.</summary>
IncorrectItemCount = 347,
///<summary>Incorrect item price.</summary>
IncorrectItemPrice = 348,
///<summary>Private store already closed.</summary>
PrivateStoreAlreadyClosed = 349,
///<summary>Item out of stock.</summary>
ItemOutOfStock = 350,
///<summary>Incorrect item count.</summary>
NotEnoughItems = 351,
///<summary>Cancel enchant.</summary>
CancelEnchant = 354,
///<summary>Inappropriate enchant conditions.</summary>
InappropriateEnchantCondition = 355,
///<summary>Reject resurrection.</summary>
RejectResurrection = 356,
///<summary>It has already been spoiled.</summary>
AlreadySpoiled = 357,
///<summary>$s1 hour(s) until catle siege conclusion.</summary>
S1HoursUntilSiegeConclusion = 358,
///<summary>$s1 minute(s) until catle siege conclusion.</summary>
S1MinutesUntilSiegeConclusion = 359,
///<summary>Castle siege $s1 second(s) left!.</summary>
CastleSiegeS1SecondsLeft = 360,
///<summary>Over-hit!.</summary>
OverHit = 361,
///<summary>You have acquired $s1 bonus experience from a successful over-hit.</summary>
AcquiredBonusExperienceThroughOverHit = 362,
///<summary>Chat available time: $s1 minute.</summary>
ChatAvailableS1Minute = 363,
///<summary>Enter user's name to search.</summary>
EnterUserNameToSearch = 364,
///<summary>Are you sure?.</summary>
AreYouSure = 365,
///<summary>Please select your hair color.</summary>
PleaseSelectHairColor = 366,
///<summary>You cannot remove that clan character at this time.</summary>
CannotRemoveClanCharacter = 367,
///<summary>Equipped +$s1 $s2.</summary>
S1S2Equipped = 368,
///<summary>You have obtained a +$s1 $s2.</summary>
YouPickedUpAS1S2 = 369,
///<summary>Failed to pickup $s1.</summary>
FailedPickupS1 = 370,
///<summary>Acquired +$s1 $s2.</summary>
AcquiredS1S2 = 371,
///<summary>Failed to earn $s1.</summary>
FailedEarnS1 = 372,
///<summary>You are trying to destroy +$s1 $s2. Do you wish to continue?.</summary>
WishDestroyS1S2 = 373,
///<summary>You are attempting to crystallize +$s1 $s2. Do you wish to continue?.</summary>
WishCrystallizeS1S2 = 374,
///<summary>You have dropped +$s1 $s2 .</summary>
DroppedS1S2 = 375,
///<summary>$s1 has obtained +$s2$s3.</summary>
S1ObtainedS2S3 = 376,
///<summary>$S1 $S2 disappeared.</summary>
S1S2Disappeared = 377,
///<summary>$s1 purchased $s2.</summary>
S1PurchasedS2 = 378,
///<summary>$s1 purchased +$s2$s3.</summary>
S1PurchasedS2S3 = 379,
///<summary>$s1 purchased $s3 $s2(s).</summary>
S1PurchasedS3S2S = 380,
///<summary>The game client encountered an error and was unable to connect to the petition server.</summary>
GameClientUnableToConnectToPetitionServer = 381,
///<summary>Currently there are no users that have checked out a GM ID.</summary>
NoUsersCheckedOutGmId = 382,
///<summary>Request confirmed to end consultation at petition server.</summary>
RequestConfirmedToEndConsultation = 383,
///<summary>The client is not logged onto the game server.</summary>
ClientNotLoggedOntoGameServer = 384,
///<summary>Request confirmed to begin consultation at petition server.</summary>
RequestConfirmedToBeginConsultation = 385,
///<summary>The body of your petition must be more than five characters in length.</summary>
PetitionMoreThanFiveCharacters = 386,
///<summary>This ends the GM petition consultation. Please take a moment to provide feedback about this service.</summary>
ThisEndThePetitionPleaseProvideFeedback = 387,
///<summary>Not under petition consultation.</summary>
NotUnderPetitionConsultation = 388,
///<summary>our petition application has been accepted. - Receipt No. is $s1.</summary>
PetitionAcceptedRecentNoS1 = 389,
///<summary>You may only submit one petition (active) at a time.</summary>
OnlyOneActivePetitionAtTime = 390,
///<summary>Receipt No. $s1, petition cancelled.</summary>
RecentNoS1Canceled = 391,
///<summary>Under petition advice.</summary>
UnderPetitionAdvice = 392,
///<summary>Failed to cancel petition. Please try again later.</summary>
FailedCancelPetitionTryLater = 393,
///<summary>Petition consultation with $s1, under way.</summary>
PetitionWithS1UnderWay = 394,
///<summary>Ending petition consultation with $s1.</summary>
PetitionEndedWithS1 = 395,
///<summary>Please login after changing your temporary password.</summary>
TryAgainAfterChangingPassword = 396,
///<summary>Not a paid account.</summary>
NoPaidAccount = 397,
///<summary>There is no time left on this account.</summary>
NoTimeLeftOnAccount = 398,
///<summary>You are attempting to drop $s1. Dou you wish to continue?.</summary>
WishToDropS1 = 400,
///<summary>You have to many ongoing quests.</summary>
TooManyQuests = 401,
///<summary>You do not possess the correct ticket to board the boat.</summary>
NotCorrectBoatTicket = 402,
///<summary>You have exceeded your out-of-pocket adena limit.</summary>
ExceecedPocketAdenaLimit = 403,
///<summary>Your Create Item level is too low to register this recipe.</summary>
CreateLvlTooLowToRegister = 404,
///<summary>The total price of the product is too high.</summary>
TotalPriceTooHigh = 405,
///<summary>Petition application accepted.</summary>
PetitionAppAccepted = 406,
///<summary>Petition under process.</summary>
PetitionUnderProcess = 407,
///<summary>Set Period.</summary>
SetPeriod = 408,
///<summary>Set Time-$s1:$s2:$s3.</summary>
SetTimeS1S2S3 = 409,
///<summary>Registration Period.</summary>
RegistrationPeriod = 410,
///<summary>Registration Time-$s1:$s2:$s3.</summary>
RegistrationTimeS1S2S3 = 411,
///<summary>Battle begins in $s1:$s2:$s3.</summary>
BattleBeginsS1S2S3 = 412,
///<summary>Battle ends in $s1:$s2:$s3.</summary>
BattleEndsS1S2S3 = 413,
///<summary>Standby.</summary>
Standby = 414,
///<summary>Under Siege.</summary>
UnderSiege = 415,
///<summary>This item cannot be exchanged.</summary>
ItemCannotExchange = 416,
///<summary>$s1 has been disarmed.</summary>
S1Disarmed = 417,
///<summary>$s1 minute(s) of usage time left.</summary>
S1MinutesUsageLeft = 419,
///<summary>Time expired.</summary>
TimeExpired = 420,
///<summary>Another person has logged in with the same account.</summary>
AnotherLoginWithAccount = 421,
///<summary>You have exceeded the weight limit.</summary>
WeightLimitExceeded = 422,
///<summary>You have cancelled the enchanting process.</summary>
EnchantScrollCancelled = 423,
///<summary>Does not fit strengthening conditions of the scroll.</summary>
DoesNotFitScrollConditions = 424,
///<summary>Your Create Item level is too low to register this recipe.</summary>
CreateLvlTooLowToRegister2 = 425,
///<summary>(Reference Number Regarding Membership Withdrawal Request: $s1).</summary>
ReferenceMembershipWithdrawalS1 = 445,
///<summary>.</summary>
Dot = 447,
///<summary>There is a system error. Please log in again later.</summary>
SystemErrorLoginLater = 448,
///<summary>The password you have entered is incorrect.</summary>
PasswordEnteredIncorrect1 = 449,
///<summary>Confirm your account information and log in later.</summary>
ConfirmAccountLoginLater = 450,
///<summary>The password you have entered is incorrect.</summary>
PasswordEnteredIncorrect2 = 451,
///<summary>Please confirm your account information and try logging in later.</summary>
PleaseConfirmAccountLoginLater = 452,
///<summary>Your account information is incorrect.</summary>
AccountInformationIncorrect = 453,
///<summary>Account is already in use. Unable to log in.</summary>
AccountInUse = 455,
///<summary>Lineage II game services may be used by individuals 15 years of age or older except for PvP servers,which may only be used by adults 18 years of age and older (Korea Only).</summary>
LinageMinimumAge = 456,
///<summary>Currently undergoing game server maintenance. Please log in again later.</summary>
ServerMaintenance = 457,
///<summary>Your usage term has expired.</summary>
UsageTermExpired = 458,
///<summary>to reactivate your account.</summary>
ToReactivateYourAccount = 460,
///<summary>Access failed.</summary>
AccessFailed = 461,
///<summary>Please try again later.</summary>
PleaseTryAgainLater = 461,
///<summary>This feature is only available alliance leaders.</summary>
FeatureOnlyForAllianceLeader = 464,
///<summary>You are not currently allied with any clans.</summary>
NoCurrentAlliances = 465,
///<summary>You have exceeded the limit.</summary>
YouHaveExceededTheLimit = 466,
///<summary>You may not accept any clan within a day after expelling another clan.</summary>
CantInviteClanWithin1Day = 467,
///<summary>A clan that has withdrawn or been expelled cannot enter into an alliance within one day of withdrawal or expulsion.</summary>
CantEnterAllianceWithin1Day = 468,
///<summary>You may not ally with a clan you are currently at war with. That would be diabolical and treacherous.</summary>
MayNotAllyClanBattle = 469,
///<summary>Only the clan leader may apply for withdrawal from the alliance.</summary>
OnlyClanLeaderWithdrawAlly = 470,
///<summary>Alliance leaders cannot withdraw.</summary>
AllianceLeaderCantWithdraw = 471,
///<summary>You cannot expel yourself from the clan.</summary>
CannotExpelYourself = 472,
///<summary>Different alliance.</summary>
DifferentAlliance = 473,
///<summary>That clan does not exist.</summary>
ClanDoesntExists = 474,
///<summary>Different alliance.</summary>
DifferentAlliance2 = 475,
///<summary>Please adjust the image size to 8x12.</summary>
AdjustImage812 = 476,
///<summary>No response. Invitation to join an alliance has been cancelled.</summary>
NoResponseToAllyInvitation = 477,
///<summary>No response. Your entrance to the alliance has been cancelled.</summary>
YouDidNotRespondToAllyInvitation = 478,
///<summary>$s1 has joined as a friend.</summary>
S1JoinedAsFriend = 479,
///<summary>Please check your friend list.</summary>
PleaseCheckYourFriendsList = 480,
///<summary>$s1 has been deleted from your friends list.</summary>
S1HasBeenDeletedFromYourFriendsList = 481,
///<summary>You cannot add yourself to your own friend list.</summary>
YouCannotAddYourselfToYourOwnFriendsList = 482,
///<summary>This function is inaccessible right now. Please try again later.</summary>
FunctionInaccessibleNow = 483,
///<summary>This player is already registered in your friends list.</summary>
S1AlreadyInFriendsList = 484,
///<summary>No new friend invitations may be accepted.</summary>
NoNewInvitationsAccepted = 485,
///<summary>The following user is not in your friends list.</summary>
TheUserNotInFriendsList = 486,
///<summary>======Friends List======.</summary>
FriendListHeader = 487,
///<summary>$s1 (Currently: Online).</summary>
S1Online = 488,
///<summary>$s1 (Currently: Offline).</summary>
S1Offline = 489,
///<summary>========================.</summary>
FriendListFooter = 490,
///<summary>=======Alliance Information=======.</summary>
AllianceInfoHead = 491,
///<summary>Alliance Name: $s1.</summary>
AllianceNameS1 = 492,
///<summary>Connection: $s1 / Total $s2.</summary>
ConnectionS1TotalS2 = 493,
///<summary>Alliance Leader: $s2 of $s1.</summary>
AllianceLeaderS2OfS1 = 494,
///<summary>Affiliated clans: Total $s1 clan(s).</summary>
AllianceClanTotalS1 = 495,
///<summary>=====Clan Information=====.</summary>
ClanInfoHead = 496,
///<summary>Clan Name: $s1.</summary>
ClanInfoNameS1 = 497,
///<summary>Clan Leader: $s1.</summary>
ClanInfoLeaderS1 = 498,
///<summary>Clan Level: $s1.</summary>
ClanInfoLevelS1 = 499,
///<summary>------------------------.</summary>
ClanInfoSeparator = 500,
///<summary>========================.</summary>
ClanInfoFoot = 501,
///<summary>You already belong to another alliance.</summary>
AlreadyJoinedAlliance = 502,
///<summary>$s1 (Friend) has logged in.</summary>
FriendS1HasLoggedIn = 503,
///<summary>Only clan leaders may create alliances.</summary>
OnlyClanLeaderCreateAlliance = 504,
///<summary>You cannot create a new alliance within 10 days after dissolution.</summary>
CantCreateAlliance10DaysDisolution = 505,
///<summary>Incorrect alliance name. Please try again.</summary>
IncorrectAllianceName = 506,
///<summary>Incorrect length for an alliance name.</summary>
IncorrectAllianceNameLength = 507,
///<summary>This alliance name already exists.</summary>
AllianceAlreadyExists = 508,
///<summary>Cannot accept. clan ally is registered as an enemy during siege battle.</summary>
CantAcceptAllyEnemyForSiege = 509,
///<summary>You have invited someone to your alliance.</summary>
YouInvitedForAlliance = 510,
///<summary>You must first select a user to invite.</summary>
SelectUserToInvite = 511,
///<summary>Do you really wish to withdraw from the alliance?.</summary>
DoYouWishToWithdrw = 512,
///<summary>Enter the name of the clan you wish to expel.</summary>
EnterNameClanToExpel = 513,
///<summary>Do you really wish to dissolve the alliance?.</summary>
DoYouWishToDisolve = 514,
///<summary>$s1 has invited you to be their friend.</summary>
SiInvitedYouAsFriend = 516,
///<summary>You have accepted the alliance.</summary>
YouAcceptedAlliance = 517,
///<summary>You have failed to invite a clan into the alliance.</summary>
FailedToInviteClanInAlliance = 518,
///<summary>You have withdrawn from the alliance.</summary>
YouHaveWithdrawnFromAlliance = 519,
///<summary>You have failed to withdraw from the alliance.</summary>
YouHaveFailedToWithdrawnFromAlliance = 520,
///<summary>You have succeeded in expelling a clan.</summary>
YouHaveExpeledAClan = 521,
///<summary>You have failed to expel a clan.</summary>
FailedToExpeledAClan = 522,
///<summary>The alliance has been dissolved.</summary>
AllianceDisolved = 523,
///<summary>You have failed to dissolve the alliance.</summary>
FailedToDisolveAlliance = 524,
///<summary>You have succeeded in inviting a friend to your friends list.</summary>
YouHaveSucceededInvitingFriend = 525,
///<summary>You have failed to add a friend to your friends list.</summary>
FailedToInviteAFriend = 526,
///<summary>$s1 leader, $s2, has requested an alliance.</summary>
S2AllianceLeaderOfS1RequestedAlliance = 527,
///<summary>The Spiritshot does not match the weapon's grade.</summary>
SpiritshotsGradeMismatch = 530,
///<summary>You do not have enough Spiritshots for that.</summary>
NotEnoughSpiritshots = 531,
///<summary>You may not use Spiritshots.</summary>
CannotUseSpiritshots = 532,
///<summary>Power of Mana enabled.</summary>
EnabledSpiritshot = 533,
///<summary>Power of Mana disabled.</summary>
DisabledSpiritshot = 534,
///<summary>How much adena do you wish to transfer to your Inventory?.</summary>
HowMuchAdenaTransfer = 536,
///<summary>How much will you transfer?.</summary>
HowMuchTransfer = 537,
///<summary>Your SP has decreased by $s1.</summary>
SpDecreasedS1 = 538,
///<summary>Your Experience has decreased by $s1.</summary>
ExpDecreasedByS1 = 539,
///<summary>Clan leaders may not be deleted. Dissolve the clan first and try again.</summary>
ClanLeadersMayNotBeDeleted = 540,
///<summary>You may not delete a clan member. Withdraw from the clan first and try again.</summary>
ClanMemberMayNotBeDeleted = 541,
///<summary>The NPC server is currently down. Pets and servitors cannot be summoned at this time.</summary>
TheNpcServerIsCurrentlyDown = 542,
///<summary>You already have a pet.</summary>
YouAlreadyHaveAPet = 543,
///<summary>Your pet cannot carry this item.</summary>
ItemNotForPets = 544,
///<summary>Your pet cannot carry any more items. Remove some, then try again.</summary>
YourPetCannotCarryAnyMoreItems = 545,
///<summary>Unable to place item, your pet is too encumbered.</summary>
UnableToPlaceItemYourPetIsTooEncumbered = 546,
///<summary>Summoning your pet.</summary>
SummonAPet = 547,
///<summary>Your pet's name can be up to 8 characters in length.</summary>
NamingPetnameUpTo_8Chars = 548,
///<summary>To create an alliance, your clan must be Level 5 or higher.</summary>
ToCreateAnAllyYouClanMustBeLevel5OrHigher = 549,
///<summary>You may not create an alliance during the term of dissolution postponement.</summary>
YouMayNotCreateAllyWhileDissolving = 550,
///<summary>You cannot raise your clan level during the term of dispersion postponement.</summary>
CannotRiseLevelWhileDissolutionInProgress = 551,
///<summary>During the grace period for dissolving a clan, the registration or deletion of a clan's crest is not allowed.</summary>
CannotSetCrestWhileDissolutionInProgress = 552,
///<summary>The opposing clan has applied for dispersion.</summary>
OpposingClanAppliedDispersion = 553,
///<summary>You cannot disperse the clans in your alliance.</summary>
CannotDisperseTheClansInAlly = 554,
///<summary>You cannot move - you are too encumbered.</summary>
CantMoveTooEncumbered = 555,
///<summary>You cannot move in this state.</summary>
CantMoveInThisState = 556,
///<summary>Your pet has been summoned and may not be destroyed.</summary>
PetSummonedMayNotDestroyed = 557,
///<summary>Your pet has been summoned and may not be let go.</summary>
PetSummonedMayNotLetGo = 558,
///<summary>You have purchased $s2 from $s1.</summary>
PurchasedS2FromS1 = 559,
///<summary>You have purchased +$s2 $s3 from $s1.</summary>
PurchasedS2S3FromS1 = 560,
///<summary>You have purchased $s3 $s2(s) from $s1.</summary>
PurchasedS3S2SFromS1 = 561,
///<summary>You may not crystallize this item. Your crystallization skill level is too low.</summary>
CrystallizeLevelTooLow = 562,
///<summary>Failed to disable attack target.</summary>
FailedDisableTarget = 563,
///<summary>Failed to change attack target.</summary>
FailedChangeTarget = 564,
///<summary>Not enough luck.</summary>
NotEnoughLuck = 565,
///<summary>Your confusion spell failed.</summary>
ConfusionFailed = 566,
///<summary>Your fear spell failed.</summary>
FearFailed = 567,
///<summary>Cubic Summoning failed.</summary>
CubicSummoningFailed = 568,
///<summary>Do you accept $s1's party invitation? (Item Distribution: Finders Keepers.).</summary>
S1InvitedYouToPartyFindersKeepers = 572,
///<summary>Do you accept $s1's party invitation? (Item Distribution: Random.).</summary>
S1InvitedYouToPartyRandom = 573,
///<summary>Pets and Servitors are not available at this time.</summary>
PetsAreNotAvailableAtThisTime = 574,
///<summary>How much adena do you wish to transfer to your pet?.</summary>
HowMuchAdenaTransferToPet = 575,
///<summary>How much do you wish to transfer?.</summary>
HowMuchTransfer2 = 576,
///<summary>You cannot summon during a trade or while using the private shops.</summary>
CannotSummonDuringTradeShop = 577,
///<summary>You cannot summon during combat.</summary>
YouCannotSummonInCombat = 578,
///<summary>A pet cannot be sent back during battle.</summary>
PetCannotSentBackDuringBattle = 579,
///<summary>You may not use multiple pets or servitors at the same time.</summary>
SummonOnlyOne = 580,
///<summary>There is a space in the name.</summary>
NamingThereIsASpace = 581,
///<summary>Inappropriate character name.</summary>
NamingInappropriateCharacterName = 582,
///<summary>Name includes forbidden words.</summary>
NamingIncludesForbiddenWords = 583,
///<summary>This is already in use by another pet.</summary>
NamingAlreadyInUseByAnotherPet = 584,
///<summary>Please decide on the price.</summary>
DecideOnPrice = 585,
///<summary>Pet items cannot be registered as shortcuts.</summary>
PetNoShortcut = 586,
///<summary>Your pet's inventory is full.</summary>
PetInventoryFull = 588,
///<summary>A dead pet cannot be sent back.</summary>
DeadPetCannotBeReturned = 589,
///<summary>Your pet is motionless and any attempt you make to give it something goes unrecognized.</summary>
CannotGiveItemsToDeadPet = 590,
///<summary>An invalid character is included in the pet's name.</summary>
NamingPetnameContainsInvalidChars = 591,
///<summary>Do you wish to dismiss your pet? Dismissing your pet will cause the pet necklace to disappear.</summary>
WishToDismissPet = 592,
///<summary>Starving, grumpy and fed up, your pet has left.</summary>
StarvingGrumpyAndFedUpYourPetHasLeft = 593,
///<summary>You may not restore a hungry pet.</summary>
YouCannotRestoreHungryPets = 594,
///<summary>Your pet is very hungry.</summary>
YourPetIsVeryHungry = 595,
///<summary>Your pet ate a little, but is still hungry.</summary>
YourPetAteALittleButIsStillHungry = 596,
///<summary>Your pet is very hungry. Please be careful.</summary>
YourPetIsVeryHungryPleaseBeCareful = 597,
///<summary>You may not chat while you are invisible.</summary>
NotChatWhileInvisible = 598,
///<summary>The GM has an important notice. Chat has been temporarily disabled.</summary>
GmNoticeChatDisabled = 599,
///<summary>You may not equip a pet item.</summary>
CannotEquipPetItem = 600,
///<summary>There are $S1 petitions currently on the waiting list.</summary>
S1PetitionOnWaitingList = 601,
///<summary>The petition system is currently unavailable. Please try again later.</summary>
PetitionSystemCurrentUnavailable = 602,
///<summary>That item cannot be discarded or exchanged.</summary>
CannotDiscardExchangeItem = 603,
///<summary>You may not call forth a pet or summoned creature from this location.</summary>
NotCallPetFromThisLocation = 604,
///<summary>You may register up to 64 people on your list.</summary>
MayRegisterUpTo64People = 605,
///<summary>You cannot be registered because the other person has already registered 64 people on his/her list.</summary>
OtherPersonAlready64People = 606,
///<summary>You do not have any further skills to learn. Come back when you have reached Level $s1.</summary>
DoNotHaveFurtherSkillsToLearnS1 = 607,
///<summary>$s1 has obtained $s3 $s2 by using Sweeper.</summary>
S1SweepedUpS3S2 = 608,
///<summary>$s1 has obtained $s2 by using Sweeper.</summary>
S1SweepedUpS2 = 609,
///<summary>Your skill has been canceled due to lack of HP.</summary>
SkillRemovedDueLackHp = 610,
///<summary>You have succeeded in Confusing the enemy.</summary>
ConfusingSucceeded = 611,
///<summary>The Spoil condition has been activated.</summary>
SpoilSuccess = 612,
///<summary>======Ignore List======.</summary>
BlockListHeader = 613,
///<summary>$s1 : $s2.</summary>
S1S2 = 614,
///<summary>You have failed to register the user to your Ignore List.</summary>
FailedToRegisterToIgnoreList = 615,
///<summary>You have failed to delete the character.</summary>
FailedToDeleteCharacter = 616,
///<summary>$s1 has been added to your Ignore List.</summary>
S1WasAddedToYourIgnoreList = 617,
///<summary>$s1 has been removed from your Ignore List.</summary>
S1WasRemovedFromYourIgnoreList = 618,
///<summary>$s1 has placed you on his/her Ignore List.</summary>
S1HasAddedYouToIgnoreList = 619,
///<summary>$s1 has placed you on his/her Ignore List.</summary>
S1HasAddedYouToIgnoreList2 = 620,
///<summary>Game connection attempted through a restricted IP.</summary>
ConnectionRestrictedIp = 621,
///<summary>You may not make a declaration of war during an alliance battle.</summary>
NoWarDuringAllyBattle = 622,
///<summary>Your opponent has exceeded the number of simultaneous alliance battles alllowed.</summary>
OpponentTooMuchAllyBattles1 = 623,
///<summary>$s1 Clan leader is not currently connected to the game server.</summary>
S1LeaderNotConnected = 624,
///<summary>Your request for Alliance Battle truce has been denied.</summary>
AllyBattleTruceDenied = 625,
///<summary>The $s1 clan did not respond: war proclamation has been refused.</summary>
WarProclamationHasBeenRefused = 626,
///<summary>Clan battle has been refused because you did not respond to $s1 clan's war proclamation.</summary>
YouRefusedClanWarProclamation = 627,
///<summary>You have already been at war with the $s1 clan: 5 days must pass before you can declare war again.</summary>
AlreadyAtWarWithS1Wait5Days = 628,
///<summary>Your opponent has exceeded the number of simultaneous alliance battles alllowed.</summary>
OpponentTooMuchAllyBattles2 = 629,
///<summary>War with the clan has begun.</summary>
WarWithClanBegun = 630,
///<summary>War with the clan is over.</summary>
WarWithClanEnded = 631,
///<summary>You have won the war over the clan!.</summary>
WonWarOverClan = 632,
///<summary>You have surrendered to the clan.</summary>
SurrenderedToClan = 633,
///<summary>Your alliance leader has been slain. You have been defeated by the clan.</summary>
DefeatedByClan = 634,
///<summary>The time limit for the clan war has been exceeded. War with the clan is over.</summary>
TimeUpWarOver = 635,
///<summary>You are not involved in a clan war.</summary>
NotInvolvedInWar = 636,
///<summary>A clan ally has registered itself to the opponent.</summary>
AllyRegisteredSelfToOpponent = 637,
///<summary>You have already requested a Siege Battle.</summary>
AlreadyRequestedSiegeBattle = 638,
///<summary>Your application has been denied because you have already submitted a request for another Siege Battle.</summary>
ApplicationDeniedBecauseAlreadySubmittedARequestForAnotherSiegeBattle = 639,
///<summary>You are already registered to the attacker side and must not cancel your registration before submitting your request.</summary>
AlreadyAttackerNotCancel = 642,
///<summary>You are already registered to the defender side and must not cancel your registration before submitting your request.</summary>
AlreadyDefenderNotCancel = 643,
///<summary>You are not yet registered for the castle siege.</summary>
NotRegisteredForSiege = 644,
///<summary>Only clans of level 4 or higher may register for a castle siege.</summary>
OnlyClanLevel4AboveMaySiege = 645,
///<summary>No more registrations may be accepted for the attacker side.</summary>
AttackerSideFull = 648,
///<summary>No more registrations may be accepted for the defender side.</summary>
DefenderSideFull = 649,
///<summary>You may not summon from your current location.</summary>
YouMayNotSummonFromYourCurrentLocation = 650,
///<summary>Place $s1 in the current location and direction. Do you wish to continue?.</summary>
PlaceS1InCurrentLocationAndDirection = 651,
///<summary>The target of the summoned monster is wrong.</summary>
TargetOfSummonWrong = 652,
///<summary>You do not have the authority to position mercenaries.</summary>
YouDoNotHaveAuthorityToPositionMercenaries = 653,
///<summary>You do not have the authority to cancel mercenary positioning.</summary>
YouDoNotHaveAuthorityToCancelMercenaryPositioning = 654,
///<summary>Mercenaries cannot be positioned here.</summary>
MercenariesCannotBePositionedHere = 655,
///<summary>This mercenary cannot be positioned anymore.</summary>
ThisMercenaryCannotBePositionedAnymore = 656,
///<summary>Positioning cannot be done here because the distance between mercenaries is too short.</summary>
PositioningCannotBeDoneBecauseDistanceBetweenMercenariesTooShort = 657,
///<summary>This is not a mercenary of a castle that you own and so you cannot cancel its positioning.</summary>
ThisIsNotAMercenaryOfACastleThatYouOwnAndSoCannotCancelPositioning = 658,
///<summary>This is not the time for siege registration and so registrations cannot be accepted or rejected.</summary>
NotSiegeRegistrationTime1 = 659,
///<summary>This is not the time for siege registration and so registration and cancellation cannot be done.</summary>
NotSiegeRegistrationTime2 = 659,
///<summary>This character cannot be spoiled.</summary>
SpoilCannotUse = 661,
///<summary>The other player is rejecting friend invitations.</summary>
ThePlayerIsRejectingFriendInvitations = 662,
///<summary>Please choose a person to receive.</summary>
ChoosePersonToReceive = 664,
///<summary>of alliance is applying for alliance war. Do you want to accept the challenge?.</summary>
ApplyingAllianceWar = 665,
///<summary>A request for ceasefire has been received from alliance. Do you agree?.</summary>
RequestForCeasefire = 666,
///<summary>You are registering on the attacking side of the siege. Do you want to continue?.</summary>
RegisteringOnAttackingSide = 667,
///<summary>You are registering on the defending side of the siege. Do you want to continue?.</summary>
RegisteringOnDefendingSide = 668,
///<summary>You are canceling your application to participate in the siege battle. Do you want to continue?.</summary>
CancelingRegistration = 669,
///<summary>You are refusing the registration of clan on the defending side. Do you want to continue?.</summary>
RefusingRegistration = 670,
///<summary>You are agreeing to the registration of clan on the defending side. Do you want to continue?.</summary>
AgreeingRegistration = 671,
///<summary>$s1 adena disappeared.</summary>
S1DisappearedAdena = 672,
///<summary>Only a clan leader whose clan is of level 2 or higher is allowed to participate in a clan hall auction.</summary>
AuctionOnlyClanLevel2Higher = 673,
///<summary>I has not yet been seven days since canceling an auction.</summary>
NotSevenDaysSinceCancelingAuction = 674,
///<summary>There are no clan halls up for auction.</summary>
NoClanHallsUpForAuction = 675,
///<summary>Since you have already submitted a bid, you are not allowed to participate in another auction at this time.</summary>
AlreadySubmittedBid = 676,
///<summary>Your bid price must be higher than the minimum price that can be bid.</summary>
BidPriceMustBeHigher = 677,
///<summary>You have submitted a bid for the auction of $s1.</summary>
SubmittedABid = 678,
///<summary>You have canceled your bid.</summary>
CanceledBid = 679,
///<summary>You cannot participate in an auction.</summary>
CannotParticipateInAuction = 680,
///<summary>The clan does not own a clan hall.</summary>
// CLAN_HAS_NO_CLAN_HALL(681) // Doesn't exist in Hellbound anymore = 681,
///<summary>There are no priority rights on a sweeper.</summary>
SweepNotAllowed = 683,
///<summary>You cannot position mercenaries during a siege.</summary>
CannotPositionMercsDuringSiege = 684,
///<summary>You cannot apply for clan war with a clan that belongs to the same alliance.</summary>
CannotDeclareWarOnAlly = 685,
///<summary>You have received $s1 damage from the fire of magic.</summary>
S1DamageFromFireMagic = 686,
///<summary>You cannot move while frozen. Please wait.</summary>
CannotMoveFrozen = 687,
///<summary>The clan that owns the castle is automatically registered on the defending side.</summary>
ClanThatOwnsCastleIsAutomaticallyRegisteredDefending = 688,
///<summary>A clan that owns a castle cannot participate in another siege.</summary>
ClanThatOwnsCastleCannotParticipateOtherSiege = 689,
///<summary>You cannot register on the attacking side because you are part of an alliance with the clan that owns the castle.</summary>
CannotAttackAllianceCastle = 690,
///<summary>$s1 clan is already a member of $s2 alliance.</summary>
S1ClanAlreadyMemberOfS2Alliance = 691,
///<summary>The other party is frozen. Please wait a moment.</summary>
OtherPartyIsFrozen = 692,
///<summary>The package that arrived is in another warehouse.</summary>
PackageInAnotherWarehouse = 693,
///<summary>No packages have arrived.</summary>
NoPackagesArrived = 694,
///<summary>You cannot set the name of the pet.</summary>
NamingYouCannotSetNameOfThePet = 695,
///<summary>The item enchant value is strange.</summary>
ItemEnchantValueStrange = 697,
///<summary>The price is different than the same item on the sales list.</summary>
PriceDifferentFromSalesList = 698,
///<summary>Currently not purchasing.</summary>
CurrentlyNotPurchasing = 699,
///<summary>The purchase is complete.</summary>
ThePurchaseIsComplete = 700,
///<summary>You do not have enough required items.</summary>
NotEnoughRequiredItems = 701,
///<summary>There are no GMs currently visible in the public list as they may be performing other functions at the moment.</summary>
NoGmProvidingServiceNow = 702,
///<summary>======GM List======.</summary>
GmList = 703,
///<summary>GM : $s1.</summary>
GmS1 = 704,
///<summary>You cannot exclude yourself.</summary>
CannotExcludeSelf = 705,
///<summary>You can only register up to 64 names on your exclude list.</summary>
Only64NamesOnExcludeList = 706,
///<summary>You cannot teleport to a village that is in a siege.</summary>
NoPortThatIsInSige = 707,
///<summary>You do not have the right to use the castle warehouse.</summary>
YouDoNotHaveTheRightToUseCastleWarehouse = 708,
///<summary>You do not have the right to use the clan warehouse.</summary>
YouDoNotHaveTheRightToUseClanWarehouse = 709,
///<summary>Only clans of clan level 1 or higher can use a clan warehouse.</summary>
OnlyLevel1ClanOrHigherCanUseWarehouse = 710,
///<summary>The siege of $s1 has started.</summary>
SiegeOfS1HasStarted = 711,
///<summary>The siege of $s1 has finished.</summary>
SiegeOfS1HasEnded = 712,
///<summary>$s1/$s2/$s3 :.</summary>
S1S2S3D = 713,
///<summary>A trap device has been tripped.</summary>
ATrapDeviceHasBeenTripped = 714,
///<summary>A trap device has been stopped.</summary>
ATrapDeviceHasBeenStopped = 715,
///<summary>If a base camp does not exist, resurrection is not possible.</summary>
NoResurrectionWithoutBaseCamp = 716,
///<summary>The guardian tower has been destroyed and resurrection is not possible.</summary>
TowerDestroyedNoResurrection = 717,
///<summary>The castle gates cannot be opened and closed during a siege.</summary>
GatesNotOpenedClosedDuringSiege = 718,
///<summary>You failed at mixing the item.</summary>
ItemMixingFailed = 719,
///<summary>The purchase price is higher than the amount of money that you have and so you cannot open a personal store.</summary>
ThePurchasePriceIsHigherThanMoney = 720,
///<summary>You cannot create an alliance while participating in a siege.</summary>
NoAllyCreationWhileSiege = 721,
///<summary>You cannot dissolve an alliance while an affiliated clan is participating in a siege battle.</summary>
CannotDissolveAllyWhileInSiege = 722,
///<summary>The opposing clan is participating in a siege battle.</summary>
OpposingClanIsParticipatingInSiege = 723,
///<summary>You cannot leave while participating in a siege battle.</summary>
CannotLeaveWhileSiege = 724,
///<summary>You cannot banish a clan from an alliance while the clan is participating in a siege.</summary>
CannotDismissWhileSiege = 725,
///<summary>Frozen condition has started. Please wait a moment.</summary>
FrozenConditionStarted = 726,
///<summary>The frozen condition was removed.</summary>
FrozenConditionRemoved = 727,
///<summary>You cannot apply for dissolution again within seven days after a previous application for dissolution.</summary>
CannotApplyDissolutionAgain = 728,
///<summary>That item cannot be discarded.</summary>
ItemNotDiscarded = 729,
///<summary>- You have submitted your $s1th petition. - You may submit $s2 more petition(s) today.</summary>
SubmittedYouS1ThPetitionS2Left = 730,
///<summary>A petition has been received by the GM on behalf of $s1. The petition code is $s2.</summary>
PetitionS1ReceivedCodeIsS2 = 731,
///<summary>$s1 has received a request for a consultation with the GM.</summary>
S1ReceivedConsultationRequest = 732,
///<summary>We have received $s1 petitions from you today and that is the maximum that you can submit in one day. You cannot submit any more petitions.</summary>
WeHaveReceivedS1PetitionsToday = 733,
///<summary>You have failed at submitting a petition on behalf of someone else. $s1 already submitted a petition.</summary>
PetitionFailedS1AlreadySubmitted = 734,
///<summary>You have failed at submitting a petition on behalf of $s1. The error number is $s2.</summary>
PetitionFailedForS1ErrorNumberS2 = 735,
///<summary>The petition was canceled. You may submit $s1 more petition(s) today.</summary>
PetitionCanceledSubmitS1MoreToday = 736,
///<summary>You have cancelled submitting a petition on behalf of $s1.</summary>
CanceledPetitionOnS1 = 737,
///<summary>You have not submitted a petition.</summary>
PetitionNotSubmitted = 738,
///<summary>You have failed at cancelling a petition on behalf of $s1. The error number is $s2.</summary>
PetitionCancelFailedForS1ErrorNumberS2 = 739,
///<summary>$s1 participated in a petition chat at the request of the GM.</summary>
S1ParticipatePetition = 740,
///<summary>You have failed at adding $s1 to the petition chat. Petition has already been submitted.</summary>
FailedAddingS1ToPetition = 741,
///<summary>You have failed at adding $s1 to the petition chat. The error code is $s2.</summary>
PetitionAddingS1FailedErrorNumberS2 = 742,
///<summary>$s1 left the petition chat.</summary>
S1LeftPetitionChat = 743,
///<summary>You have failed at removing $s1 from the petition chat. The error code is $s2.</summary>
PetitionRemovingS1FailedErrorNumberS2 = 744,
///<summary>You are currently not in a petition chat.</summary>
YouAreNotInPetitionChat = 745,
///<summary>It is not currently a petition.</summary>
CurrentlyNoPetition = 746,
///<summary>The distance is too far and so the casting has been stopped.</summary>
DistTooFarCastingStopped = 748,
///<summary>The effect of $s1 has been removed.</summary>
EffectS1Disappeared = 749,
///<summary>There are no other skills to learn.</summary>
NoMoreSkillsToLearn = 750,
///<summary>As there is a conflict in the siege relationship with a clan in the alliance, you cannot invite that clan to the alliance.</summary>
CannotInviteConflictClan = 751,
///<summary>That name cannot be used.</summary>
CannotUseName = 752,
///<summary>You cannot position mercenaries here.</summary>
NoMercsHere = 753,
///<summary>There are $s1 hours and $s2 minutes left in this week's usage time.</summary>
S1HoursS2MinutesLeftThisWeek = 754,
///<summary>There are $s1 minutes left in this week's usage time.</summary>
S1MinutesLeftThisWeek = 755,
///<summary>This week's usage time has finished.</summary>
WeeksUsageTimeFinished = 756,
///<summary>There are $s1 hours and $s2 minutes left in the fixed use time.</summary>
S1HoursS2MinutesLeftInTime = 757,
///<summary>There are $s1 hours and $s2 minutes left in this week's play time.</summary>
S1HoursS2MinutesLeftThisWeeksPlayTime = 758,
///<summary>There are $s1 minutes left in this week's play time.</summary>
S1MinutesLeftThisWeeksPlayTime = 759,
///<summary>$s1 cannot join the clan because one day has not yet passed since he/she left another clan.</summary>
S1MustWaitBeforeJoiningAnotherClan = 760,
///<summary>$s1 clan cannot join the alliance because one day has not yet passed since it left another alliance.</summary>
S1CantEnterAllianceWithin1Day = 761,
///<summary>$s1 rolled $s2 and $s3's eye came out.</summary>
S1RolledS2S3EyeCameOut = 762,
///<summary>You failed at sending the package because you are too far from the warehouse.</summary>
FailedSendingPackageTooFar = 763,
///<summary>You have been playing for an extended period of time. Please consider taking a break.</summary>
PlayingForLongTime = 764,
///<summary>A hacking tool has been discovered. Please try again after closing unnecessary programs.</summary>
HackingTool = 769,
///<summary>Play time is no longer accumulating.</summary>
PlayTimeNoLongerAccumulating = 774,
///<summary>From here on, play time will be expended.</summary>
PlayTimeExpended = 775,
///<summary>The clan hall which was put up for auction has been awarded to clan s1.</summary>
ClanhallAwardedToClanS1 = 776,
///<summary>The clan hall which was put up for auction was not sold and therefore has been re-listed.</summary>
ClanhallNotSold = 777,
///<summary>You may not log out from this location.</summary>
NoLogoutHere = 778,
///<summary>You may not restart in this location.</summary>
NoRestartHere = 779,
///<summary>Observation is only possible during a siege.</summary>
OnlyViewSiege = 780,
///<summary>Observers cannot participate.</summary>
ObserversCannotParticipate = 781,
///<summary>You may not observe a siege with a pet or servitor summoned.</summary>
NoObserveWithPet = 782,
///<summary>Lottery ticket sales have been temporarily suspended.</summary>
LotteryTicketSalesTempSuspended = 783,
///<summary>Tickets for the current lottery are no longer available.</summary>
NoLotteryTicketsAvailable = 784,
///<summary>The results of lottery number $s1 have not yet been published.</summary>
LotteryS1ResultNotPublished = 785,
///<summary>Incorrect syntax.</summary>
IncorrectSyntax = 786,
///<summary>The tryouts are finished.</summary>
ClanhallSiegeTryoutsFinished = 787,
///<summary>The finals are finished.</summary>
ClanhallSiegeFinalsFinished = 788,
///<summary>The tryouts have begun.</summary>
ClanhallSiegeTryoutsBegun = 789,
///<summary>The finals are finished.</summary>
ClanhallSiegeFinalsBegun = 790,
///<summary>The final match is about to begin. Line up!.</summary>
FinalMatchBegin = 791,
///<summary>The siege of the clan hall is finished.</summary>
ClanhallSiegeEnded = 792,
///<summary>The siege of the clan hall has begun.</summary>
ClanhallSiegeBegun = 793,
///<summary>You are not authorized to do that.</summary>
YouAreNotAuthorizedToDoThat = 794,
///<summary>Only clan leaders are authorized to set rights.</summary>
OnlyLeadersCanSetRights = 795,
///<summary>Your remaining observation time is minutes.</summary>
RemainingObservationTime = 796,
///<summary>You may create up to 24 macros.</summary>
YouMayCreateUpTo24Macros = 797,
///<summary>Item registration is irreversible. Do you wish to continue?.</summary>
ItemRegistrationIrreversible = 798,
///<summary>The observation time has expired.</summary>
ObservationTimeExpired = 799,
///<summary>You are too late. The registration period is over.</summary>
RegistrationPeriodOver = 800,
///<summary>Registration for the clan hall siege is closed.</summary>
RegistrationClosed = 801,
///<summary>Petitions are not being accepted at this time. You may submit your petition after a.m./p.m.</summary>
PetitionNotAcceptedNow = 802,
///<summary>Enter the specifics of your petition.</summary>
PetitionNotSpecified = 803,
///<summary>Select a type.</summary>
SelectType = 804,
///<summary>Petitions are not being accepted at this time. You may submit your petition after $s1 a.m./p.m.</summary>
PetitionNotAcceptedSubmitAtS1 = 805,
///<summary>If you are trapped, try typing "/unstuck".</summary>
TryUnstuckWhenTrapped = 806,
///<summary>This terrain is navigable. Prepare for transport to the nearest village.</summary>
StuckPrepareForTransport = 807,
///<summary>You are stuck. You may submit a petition by typing "/gm".</summary>
StuckSubmitPetition = 808,
///<summary>You are stuck. You will be transported to the nearest village in five minutes.</summary>
StuckTransportInFiveMinutes = 809,
///<summary>Invalid macro. Refer to the Help file for instructions.</summary>
InvalidMacro = 810,
///<summary>You will be moved to (). Do you wish to continue?.</summary>
WillBeMoved = 811,
///<summary>The secret trap has inflicted $s1 damage on you.</summary>
TrapDidS1Damage = 812,
///<summary>You have been poisoned by a Secret Trap.</summary>
PoisonedByTrap = 813,
///<summary>Your speed has been decreased by a Secret Trap.</summary>
SlowedByTrap = 814,
///<summary>The tryouts are about to begin. Line up!.</summary>
TryoutsAboutToBegin = 815,
///<summary>Tickets are now available for Monster Race $s1!.</summary>
MonsraceTicketsAvailableForS1Race = 816,
///<summary>Now selling tickets for Monster Race $s1!.</summary>
MonsraceTicketsNowAvailableForS1Race = 817,
///<summary>Ticket sales for the Monster Race will end in $s1 minute(s).</summary>
MonsraceTicketsStopInS1Minutes = 818,
///<summary>Tickets sales are closed for Monster Race $s1. Odds are posted.</summary>
MonsraceS1TicketSalesClosed = 819,
///<summary>Monster Race $s2 will begin in $s1 minute(s)!.</summary>
MonsraceS2BeginsInS1Minutes = 820,
///<summary>Monster Race $s1 will begin in 30 seconds!.</summary>
MonsraceS1BeginsIn30Seconds = 821,
///<summary>Monster Race $s1 is about to begin! Countdown in five seconds!.</summary>
MonsraceS1CountdownInFiveSeconds = 822,
///<summary>The race will begin in $s1 second(s)!.</summary>
MonsraceBeginsInS1Seconds = 823,
///<summary>They're off!.</summary>
MonsraceRaceStart = 824,
///<summary>Monster Race $s1 is finished!.</summary>
MonsraceS1RaceEnd = 825,
///<summary>First prize goes to the player in lane $s1. Second prize goes to the player in lane $s2.</summary>
MonsraceFirstPlaceS1SecondS2 = 826,
///<summary>You may not impose a block on a GM.</summary>
YouMayNotImposeABlockOnGm = 827,
///<summary>Are you sure you wish to delete the $s1 macro?.</summary>
WishToDeleteS1Macro = 828,
///<summary>You cannot recommend yourself.</summary>
YouCannotRecommendYourself = 829,
///<summary>You have recommended $s1. You have $s2 recommendations left.</summary>
YouHaveRecommendedS1YouHaveS2RecommendationsLeft = 830,
///<summary>You have been recommended by $s1.</summary>
YouHaveBeenRecommendedByS1 = 831,
///<summary>That character has already been recommended.</summary>
ThatCharacterIsRecommended = 832,
///<summary>You are not authorized to make further recommendations at this time. You will receive more recommendation credits each day at 1 p.m.</summary>
NoMoreRecommendationsToHave = 833,
///<summary>$s1 has rolled $s2.</summary>
S1RolledS2 = 834,
///<summary>You may not throw the dice at this time. Try again later.</summary>
YouMayNotThrowTheDiceAtThisTimeTryAgainLater = 835,
///<summary>You have exceeded your inventory volume limit and cannot take this item.</summary>
YouHaveExceededYourInventoryVolumeLimitAndCannotTakeThisItem = 836,
///<summary>Macro descriptions may contain up to 32 characters.</summary>
MacroDescriptionMax32Chars = 837,
///<summary>Enter the name of the macro.</summary>
EnterTheMacroName = 838,
///<summary>That name is already assigned to another macro.</summary>
MacroNameAlreadyUsed = 839,
///<summary>That recipe is already registered.</summary>
RecipeAlreadyRegistered = 840,
///<summary>No further recipes may be registered.</summary>
NoFutherRecipesCanBeAdded = 841,
///<summary>You are not authorized to register a recipe.</summary>
NotAuthorizedRegisterRecipe = 842,
///<summary>The siege of $s1 is finished.</summary>
SiegeOfS1Finished = 843,
///<summary>The siege to conquer $s1 has begun.</summary>
SiegeOfS1Begun = 844,
///<summary>The deadlineto register for the siege of $s1 has passed.</summary>
DeadlineForSiegeS1Passed = 845,
///<summary>The siege of $s1 has been canceled due to lack of interest.</summary>
SiegeOfS1HasBeenCanceledDueToLackOfInterest = 846,
///<summary>A clan that owns a clan hall may not participate in a clan hall siege.</summary>
ClanOwningClanhallMayNotSiegeClanhall = 847,
///<summary>$s1 has been deleted.</summary>
S1HasBeenDeleted = 848,
///<summary>$s1 cannot be found.</summary>
S1NotFound = 849,
///<summary>$s1 already exists.</summary>
S1AlreadyExists2 = 850,
///<summary>$s1 has been added.</summary>
S1Added = 851,
///<summary>The recipe is incorrect.</summary>
RecipeIncorrect = 852,
///<summary>You may not alter your recipe book while engaged in manufacturing.</summary>
CantAlterRecipebookWhileCrafting = 853,
///<summary>You are missing $s2 $s1 required to create that.</summary>
MissingS2S1ToCreate = 854,
///<summary>$s1 clan has defeated $s2.</summary>
S1ClanDefeatedS2 = 855,
///<summary>The siege of $s1 has ended in a draw.</summary>
SiegeS1Draw = 856,
///<summary>$s1 clan has won in the preliminary match of $s2.</summary>
S1ClanWonMatchS2 = 857,
///<summary>The preliminary match of $s1 has ended in a draw.</summary>
MatchOfS1Draw = 858,
///<summary>Please register a recipe.</summary>
PleaseRegisterRecipe = 859,
///<summary>You may not buld your headquarters in close proximity to another headquarters.</summary>
HeadquartersTooClose = 860,
///<summary>You have exceeded the maximum number of memos.</summary>
TooManyMemos = 861,
///<summary>Odds are not posted until ticket sales have closed.</summary>
OddsNotPosted = 862,
///<summary>You feel the energy of fire.</summary>
FeelEnergyFire = 863,
///<summary>You feel the energy of water.</summary>
FeelEnergyWater = 864,
///<summary>You feel the energy of wind.</summary>
FeelEnergyWind = 865,
///<summary>You may no longer gather energy.</summary>
NoLongerEnergy = 866,
///<summary>The energy is depleted.</summary>
EnergyDepleted = 867,
///<summary>The energy of fire has been delivered.</summary>
EnergyFireDelivered = 868,
///<summary>The energy of water has been delivered.</summary>
EnergyWaterDelivered = 869,
///<summary>The energy of wind has been delivered.</summary>
EnergyWindDelivered = 870,
///<summary>The seed has been sown.</summary>
TheSeedHasBeenSown = 871,
///<summary>This seed may not be sown here.</summary>
ThisSeedMayNotBeSownHere = 872,
///<summary>That character does not exist.</summary>
CharacterDoesNotExist = 873,
///<summary>The capacity of the warehouse has been exceeded.</summary>
WarehouseCapacityExceeded = 874,
///<summary>The transport of the cargo has been canceled.</summary>
CargoCanceled = 875,
///<summary>The cargo was not delivered.</summary>
CargoNotDelivered = 876,
///<summary>The symbol has been added.</summary>
SymbolAdded = 877,
///<summary>The symbol has been deleted.</summary>
SymbolDeleted = 878,
///<summary>The manor system is currently under maintenance.</summary>
TheManorSystemIsCurrentlyUnderMaintenance = 879,
///<summary>The transaction is complete.</summary>
TheTransactionIsComplete = 880,
///<summary>There is a discrepancy on the invoice.</summary>
ThereIsADiscrepancyOnTheInvoice = 881,
///<summary>The seed quantity is incorrect.</summary>
TheSeedQuantityIsIncorrect = 882,
///<summary>The seed information is incorrect.</summary>
TheSeedInformationIsIncorrect = 883,
///<summary>The manor information has been updated.</summary>
TheManorInformationHasBeenUpdated = 884,
///<summary>The number of crops is incorrect.</summary>
TheNumberOfCropsIsIncorrect = 885,
///<summary>The crops are priced incorrectly.</summary>
TheCropsArePricedIncorrectly = 886,
///<summary>The type is incorrect.</summary>
TheTypeIsIncorrect = 887,
///<summary>No crops can be purchased at this time.</summary>
NoCropsCanBePurchasedAtThisTime = 888,
///<summary>The seed was successfully sown.</summary>
TheSeedWasSuccessfullySown = 889,
///<summary>The seed was not sown.</summary>
TheSeedWasNotSown = 890,
///<summary>You are not authorized to harvest.</summary>
YouAreNotAuthorizedToHarvest = 891,
///<summary>The harvest has failed.</summary>
TheHarvestHasFailed = 892,
///<summary>The harvest failed because the seed was not sown.</summary>
TheHarvestFailedBecauseTheSeedWasNotSown = 893,
///<summary>Up to $s1 recipes can be registered.</summary>
UpToS1RecipesCanRegister = 894,
///<summary>No recipes have been registered.</summary>
NoRecipesRegistered = 895,
///<summary>Message:The ferry has arrived at Gludin Harbor.</summary>
FerryAtGludin = 896,
///<summary>Message:The ferry will leave for Talking Island Harbor after anchoring for ten minutes.</summary>
FerryLeaveTalking = 897,
///<summary>Only characters of level 10 or above are authorized to make recommendations.</summary>
OnlyLevelSup10CanRecommend = 898,
///<summary>The symbol cannot be drawn.</summary>
CantDrawSymbol = 899,
///<summary>No slot exists to draw the symbol.</summary>
SymbolsFull = 900,
///<summary>The symbol information cannot be found.</summary>
SymbolNotFound = 901,
///<summary>The number of items is incorrect.</summary>
NumberIncorrect = 902,
///<summary>You may not submit a petition while frozen. Be patient.</summary>
NoPetitionWhileFrozen = 903,
///<summary>Items cannot be discarded while in private store status.</summary>
NoDiscardWhilePrivateStore = 904,
///<summary>The current score for the Humans is $s1.</summary>
HumanScoreS1 = 905,
///<summary>The current score for the Elves is $s1.</summary>
ElvesScoreS1 = 906,
///<summary>The current score for the Dark Elves is $s1.</summary>
DarkElvesScoreS1 = 907,
///<summary>The current score for the Orcs is $s1.</summary>
OrcsScoreS1 = 908,
///<summary>The current score for the Dwarves is $s1.</summary>
DwarvenScoreS1 = 909,
///<summary>Current location : $s1, $s2, $s3 (Near Talking Island Village).</summary>
LocTiS1S2S3 = 910,
///<summary>Current location : $s1, $s2, $s3 (Near Gludin Village).</summary>
LocGludinS1S2S3 = 911,
///<summary>Current location : $s1, $s2, $s3 (Near the Town of Gludio).</summary>
LocGludioS1S2S3 = 912,
///<summary>Current location : $s1, $s2, $s3 (Near the Neutral Zone).</summary>
LocNeutralZoneS1S2S3 = 913,
///<summary>Current location : $s1, $s2, $s3 (Near the Elven Village).</summary>
LocElvenS1S2S3 = 914,
///<summary>Current location : $s1, $s2, $s3 (Near the Dark Elf Village).</summary>
LocDarkElvenS1S2S3 = 915,
///<summary>Current location : $s1, $s2, $s3 (Near the Town of Dion).</summary>
LocDionS1S2S3 = 916,
///<summary>Current location : $s1, $s2, $s3 (Near the Floran Village).</summary>
LocFloranS1S2S3 = 917,
///<summary>Current location : $s1, $s2, $s3 (Near the Town of Giran).</summary>
LocGiranS1S2S3 = 918,
///<summary>Current location : $s1, $s2, $s3 (Near Giran Harbor).</summary>
LocGiranHarborS1S2S3 = 919,
///<summary>Current location : $s1, $s2, $s3 (Near the Orc Village).</summary>
LocOrcS1S2S3 = 920,
///<summary>Current location : $s1, $s2, $s3 (Near the Dwarven Village).</summary>
LocDwarvenS1S2S3 = 921,
///<summary>Current location : $s1, $s2, $s3 (Near the Town of Oren).</summary>
LocOrenS1S2S3 = 922,
///<summary>Current location : $s1, $s2, $s3 (Near Hunters Village).</summary>
LocHunterS1S2S3 = 923,
///<summary>Current location : $s1, $s2, $s3 (Near Aden Castle Town).</summary>
LocAdenS1S2S3 = 924,
///<summary>Current location : $s1, $s2, $s3 (Near the Coliseum).</summary>
LocColiseumS1S2S3 = 925,
///<summary>Current location : $s1, $s2, $s3 (Near Heine).</summary>
LocHeineS1S2S3 = 926,
///<summary>The current time is $s1:$s2.</summary>
TimeS1S2InTheDay = 927,
///<summary>The current time is $s1:$s2.</summary>
TimeS1S2InTheNight = 928,
///<summary>No compensation was given for the farm products.</summary>
NoCompensationForFarmProducts = 929,
///<summary>Lottery tickets are not currently being sold.</summary>
NoLotteryTicketsCurrentSold = 930,
///<summary>The winning lottery ticket numbers has not yet been anonunced.</summary>
LotteryWinnersNotAnnouncedYet = 931,
///<summary>You cannot chat locally while observing.</summary>
NoAllchatWhileObserving = 932,
///<summary>The seed pricing greatly differs from standard seed prices.</summary>
TheSeedPricingGreatlyDiffersFromStandardSeedPrices = 933,
///<summary>It is a deleted recipe.</summary>
ADeletedRecipe = 934,
///<summary>The amount is not sufficient and so the manor is not in operation.</summary>
TheAmountIsNotSufficientAndSoTheManorIsNotInOperation = 935,
///<summary>Use $s1.</summary>
//UseS1 = 936,
///<summary>Currently preparing for private workshop.</summary>
PreparingPrivateWorkshop = 937,
///<summary>The community server is currently offline.</summary>
CbOffline = 938,
///<summary>You cannot exchange while blocking everything.</summary>
NoExchangeWhileBlocking = 939,
///<summary>$s1 is blocked everything.</summary>
S1BlockedEverything = 940,
///<summary>Restart at Talking Island Village.</summary>
RestartAtTi = 941,
///<summary>Restart at Gludin Village.</summary>
RestartAtGludin = 942,
///<summary>Restart at the Town of Gludin. || guess should be Gludio ;).</summary>
RestartAtGludio = 943,
///<summary>Restart at the Neutral Zone.</summary>
RestartAtNeutralZone = 944,
///<summary>Restart at the Elven Village.</summary>
RestartAtElfenVillage = 945,
///<summary>Restart at the Dark Elf Village.</summary>
RestartAtDarkelfVillage = 946,
///<summary>Restart at the Town of Dion.</summary>
RestartAtDion = 947,
///<summary>Restart at Floran Village.</summary>
RestartAtFloran = 948,
///<summary>Restart at the Town of Giran.</summary>
RestartAtGiran = 949,
///<summary>Restart at Giran Harbor.</summary>
RestartAtGiranHarbor = 950,
///<summary>Restart at the Orc Village.</summary>
RestartAtOrcVillage = 951,
///<summary>Restart at the Dwarven Village.</summary>
RestartAtDwarfenVillage = 952,
///<summary>Restart at the Town of Oren.</summary>
RestartAtOren = 953,
///<summary>Restart at Hunters Village.</summary>
RestartAtHuntersVillage = 954,
///<summary>Restart at the Town of Aden.</summary>
RestartAtAden = 955,
///<summary>Restart at the Coliseum.</summary>
RestartAtColiseum = 956,
///<summary>Restart at Heine.</summary>
RestartAtHeine = 957,
///<summary>Items cannot be discarded or destroyed while operating a private store or workshop.</summary>
ItemsCannotBeDiscardedOrDestroyedWhileOperatingPrivateStoreOrWorkshop = 958,
///<summary>$s1 (*$s2) manufactured successfully.</summary>
S1S2ManufacturedSuccessfully = 959,
///<summary>$s1 manufacturing failure.</summary>
S1ManufactureFailure = 960,
///<summary>You are now blocking everything.</summary>
BlockingAll = 961,
///<summary>You are no longer blocking everything.</summary>
NotBlockingAll = 962,
///<summary>Please determine the manufacturing price.</summary>
DetermineManufacturePrice = 963,
///<summary>Chatting is prohibited for one minute.</summary>
ChatbanFor1Minute = 964,
///<summary>The chatting prohibition has been removed.</summary>
ChatbanRemoved = 965,
///<summary>Chatting is currently prohibited. If you try to chat before the prohibition is removed, the prohibition time will become even longer.</summary>
ChattingIsCurrentlyProhibited = 966,
///<summary>Do you accept $s1's party invitation? (Item Distribution: Random including spoil.).</summary>
S1PartyInviteRandomIncludingSpoil = 967,
///<summary>Do you accept $s1's party invitation? (Item Distribution: By Turn.).</summary>
S1PartyInviteByTurn = 968,
///<summary>Do you accept $s1's party invitation? (Item Distribution: By Turn including spoil.).</summary>
S1PartyInviteByTurnIncludingSpoil = 969,
///<summary>$s2's MP has been drained by $s1.</summary>
S2MpHasBeenDrainedByS1 = 970,
///<summary>Petitions cannot exceed 255 characters.</summary>
PetitionMaxChars255 = 971,
///<summary>This pet cannot use this item.</summary>
PetCannotUseItem = 972,
///<summary>Please input no more than the number you have.</summary>
InputNoMoreYouHave = 973,
///<summary>The soul crystal succeeded in absorbing a soul.</summary>
SoulCrystalAbsorbingSucceeded = 974,
///<summary>The soul crystal was not able to absorb a soul.</summary>
SoulCrystalAbsorbingFailed = 975,
///<summary>The soul crystal broke because it was not able to endure the soul energy.</summary>
SoulCrystalBroke = 976,
///<summary>The soul crystals caused resonation and failed at absorbing a soul.</summary>
SoulCrystalAbsorbingFailedResonation = 977,
///<summary>The soul crystal is refusing to absorb a soul.</summary>
SoulCrystalAbsorbingRefused = 978,
///<summary>The ferry arrived at Talking Island Harbor.</summary>
FerryArrivedAtTalking = 979,
///<summary>The ferry will leave for Gludin Harbor after anchoring for ten minutes.</summary>
FerryLeaveForGludinAfter10Minutes = 980,
///<summary>The ferry will leave for Gludin Harbor in five minutes.</summary>
FerryLeaveForGludinIn5Minutes = 981,
///<summary>The ferry will leave for Gludin Harbor in one minute.</summary>
FerryLeaveForGludinIn1Minute = 982,
///<summary>Those wishing to ride should make haste to get on.</summary>
MakeHasteGetOnBoat = 983,
///<summary>The ferry will be leaving soon for Gludin Harbor.</summary>
FerryLeaveSoonForGludin = 984,
///<summary>The ferry is leaving for Gludin Harbor.</summary>
FerryLeavingForGludin = 985,
///<summary>The ferry has arrived at Gludin Harbor.</summary>
FerryArrivedAtGludin = 986,
///<summary>The ferry will leave for Talking Island Harbor after anchoring for ten minutes.</summary>
FerryLeaveForTalkingAfter10Minutes = 987,
///<summary>The ferry will leave for Talking Island Harbor in five minutes.</summary>
FerryLeaveForTalkingIn5Minutes = 988,
///<summary>The ferry will leave for Talking Island Harbor in one minute.</summary>
FerryLeaveForTalkingIn1Minute = 989,
///<summary>The ferry will be leaving soon for Talking Island Harbor.</summary>
FerryLeaveSoonForTalking = 990,
///<summary>The ferry is leaving for Talking Island Harbor.</summary>
FerryLeavingForTalking = 991,
///<summary>The ferry has arrived at Giran Harbor.</summary>
FerryArrivedAtGiran = 992,
///<summary>The ferry will leave for Giran Harbor after anchoring for ten minutes.</summary>
FerryLeaveForGiranAfter10Minutes = 993,
///<summary>The ferry will leave for Giran Harbor in five minutes.</summary>
FerryLeaveForGiranIn5Minutes = 994,
///<summary>The ferry will leave for Giran Harbor in one minute.</summary>
FerryLeaveForGiranIn1Minute = 995,
///<summary>The ferry will be leaving soon for Giran Harbor.</summary>
FerryLeaveSoonForGiran = 996,
///<summary>The ferry is leaving for Giran Harbor.</summary>
FerryLeavingForGiran = 997,
///<summary>The Innadril pleasure boat has arrived. It will anchor for ten minutes.</summary>
InnadrilBoatAnchor10Minutes = 998,
///<summary>The Innadril pleasure boat will leave in five minutes.</summary>
InnadrilBoatLeaveIn5Minutes = 999,
///<summary>The Innadril pleasure boat will leave in one minute.</summary>
InnadrilBoatLeaveIn1Minute = 1000,
///<summary>The Innadril pleasure boat will be leaving soon.</summary>
InnadrilBoatLeaveSoon = 1001,
///<summary>The Innadril pleasure boat is leaving.</summary>
InnadrilBoatLeaving = 1002,
///<summary>Cannot possess a monster race ticket.</summary>
CannotPossesMonsTicket = 1003,
///<summary>You have registered for a clan hall auction.</summary>
RegisteredForClanhall = 1004,
///<summary>There is not enough adena in the clan hall warehouse.</summary>
NotEnoughAdenaInCwh = 1005,
///<summary>You have bid in a clan hall auction.</summary>
BidInClanhallAuction = 1006,
///<summary>The preliminary match registration of $s1 has finished.</summary>
PreliminaryRegistrationOfS1Finished = 1007,
///<summary>A hungry strider cannot be mounted or dismounted.</summary>
HungryStriderNotMount = 1008,
///<summary>A strider cannot be ridden when dead.</summary>
StriderCantBeRiddenWhileDead = 1009,
///<summary>A dead strider cannot be ridden.</summary>
DeadStriderCantBeRidden = 1010,
///<summary>A strider in battle cannot be ridden.</summary>
StriderInBatlleCantBeRidden = 1011,
///<summary>A strider cannot be ridden while in battle.</summary>
StriderCantBeRiddenWhileInBattle = 1012,
///<summary>A strider can be ridden only when standing.</summary>
StriderCanBeRiddenOnlyWhileStanding = 1013,
///<summary>Your pet gained $s1 experience points.</summary>
PetEarnedS1Exp = 1014,
///<summary>Your pet hit for $s1 damage.</summary>
PetHitForS1Damage = 1015,
///<summary>Pet received $s2 damage by $s1.</summary>
PetReceivedS2DamageByS1 = 1016,
///<summary>Pet's critical hit!.</summary>
CriticalHitByPet = 1017,
///<summary>Your pet uses $s1.</summary>
PetUsesS1 = 1018,
///<summary>Your pet uses $s1.</summary>
//PetUsesS1 = 1019,
///<summary>Your pet picked up $s1.</summary>
PetPickedS1 = 1020,
///<summary>Your pet picked up $s2 $s1(s).</summary>
PetPickedS2S1S = 1021,
///<summary>Your pet picked up +$s1 $s2.</summary>
PetPickedS1S2 = 1022,
///<summary>Your pet picked up $s1 adena.</summary>
PetPickedS1Adena = 1023,
///<summary>Your pet put on $s1.</summary>
PetPutOnS1 = 1024,
///<summary>Your pet took off $s1.</summary>
PetTookOffS1 = 1025,
///<summary>The summoned monster gave damage of $s1.</summary>
SummonGaveDamageS1 = 1026,
///<summary>Servitor received $s2 damage caused by $s1.</summary>
SummonReceivedDamageS2ByS1 = 1027,
///<summary>Summoned monster's critical hit!.</summary>
CriticalHitBySummonedMob = 1028,
///<summary>Summoned monster uses $s1.</summary>
SummonedMobUsesS1 = 1029,
///<summary>Party Information.</summary>
PartyInformation = 1030,
///<summary>Looting method: Finders keepers.</summary>
LootingFindersKeepers = 1031,
///<summary>Looting method: Random.</summary>
LootingRandom = 1032,
///<summary>Looting method: Random including spoil.</summary>
LootingRandomIncludeSpoil = 1033,
///<summary>Looting method: By turn.</summary>
LootingByTurn = 1034,
///<summary>Looting method: By turn including spoil.</summary>
LootingByTurnIncludeSpoil = 1035,
///<summary>You have exceeded the quantity that can be inputted.</summary>
YouHaveExceededQuantityThatCanBeInputted = 1036,
///<summary>$s1 manufactured $s2.</summary>
S1ManufacturedS2 = 1037,
///<summary>$s1 manufactured $s3 $s2(s).</summary>
S1ManufacturedS3S2S = 1038,
///<summary>Items left at the clan hall warehouse can only be retrieved by the clan leader. Do you want to continue?.</summary>
OnlyClanLeaderCanRetrieveItemsFromClanWarehouse = 1039,
///<summary>Items sent by freight can be picked up from any Warehouse location. Do you want to continue?.</summary>
ItemsSentByFreightPickedUpFromAnywhere = 1040,
///<summary>The next seed purchase price is $s1 adena.</summary>
TheNextSeedPurchasePriceIsS1Adena = 1041,
///<summary>The next farm goods purchase price is $s1 adena.</summary>
TheNextFarmGoodsPurchasePriceIsS1Adena = 1042,
///<summary>At the current time, the "/unstuck" command cannot be used. Please send in a petition.</summary>
NoUnstuckPleaseSendPetition = 1043,
///<summary>Monster race payout information is not available while tickets are being sold.</summary>
MonsraceNoPayoutInfo = 1044,
///<summary>Monster race tickets are no longer available.</summary>
MonsraceTicketsNotAvailable = 1046,
///<summary>We did not succeed in producing $s1 item.</summary>
NotSucceedProducingS1 = 1047,
///<summary>When "blocking" everything, whispering is not possible.</summary>
NoWhisperWhenBlocking = 1048,
///<summary>When "blocking" everything, it is not possible to send invitations for organizing parties.</summary>
NoPartyWhenBlocking = 1049,
///<summary>There are no communities in my clan. Clan communities are allowed for clans with skill levels of 2 and higher.</summary>
NoCbInMyClan = 1050,
///<summary>Payment for your clan hall has not been made please make payment tomorrow.</summary>
PaymentForYourClanHallHasNotBeenMadePleaseMakePaymentToYourClanWarehouseByS1Tomorrow = 1051,
///<summary>Payment of Clan Hall is overdue the owner loose Clan Hall.</summary>
TheClanHallFeeIsOneWeekOverdueThereforeTheClanHallOwnershipHasBeenRevoked = 1052,
///<summary>It is not possible to resurrect in battlefields where a siege war is taking place.</summary>
CannotBeResurrectedDuringSiege = 1053,
///<summary>You have entered a mystical land.</summary>
EnteredMysticalLand = 1054,
///<summary>You have left a mystical land.</summary>
ExitedMysticalLand = 1055,
///<summary>You have exceeded the storage capacity of the castle's vault.</summary>
VaultCapacityExceeded = 1056,
///<summary>This command can only be used in the relax server.</summary>
RelaxServerOnly = 1057,
///<summary>The sales price for seeds is $s1 adena.</summary>
TheSalesPriceForSeedsIsS1Adena = 1058,
///<summary>The remaining purchasing amount is $s1 adena.</summary>
TheRemainingPurchasingIsS1Adena = 1059,
///<summary>The remainder after selling the seeds is $s1.</summary>
TheRemainderAfterSellingTheSeedsIsS1 = 1060,
///<summary>The recipe cannot be registered. You do not have the ability to create items.</summary>
CantRegisterNoAbilityToCraft = 1061,
///<summary>Writing something new is possible after level 10.</summary>
WritingSomethingNewPossibleAfterLevel10 = 1062,
///<summary>if you become trapped or unable to move, please use the '/unstuck' command.</summary>
PetitionUnavailable = 1063,
///<summary>The equipment, +$s1 $s2, has been removed.</summary>
EquipmentS1S2Removed = 1064,
///<summary>While operating a private store or workshop, you cannot discard, destroy, or trade an item.</summary>
CannotTradeDiscardDropItemWhileInShopmode = 1065,
///<summary>$s1 HP has been restored.</summary>
S1HpRestored = 1066,
///<summary>$s2 HP has been restored by $s1.</summary>
S2HpRestoredByS1 = 1067,
///<summary>$s1 MP has been restored.</summary>
S1MpRestored = 1068,
///<summary>$s2 MP has been restored by $s1.</summary>
S2MpRestoredByS1 = 1069,
///<summary>You do not have 'read' permission.</summary>
NoReadPermission = 1070,
///<summary>You do not have 'write' permission.</summary>
NoWritePermission = 1071,
///<summary>You have obtained a ticket for the Monster Race #$s1 - Single.</summary>
ObtainedTicketForMonsRaceS1Single = 1072,
///<summary>You have obtained a ticket for the Monster Race #$s1 - Single.</summary>
//ObtainedTicketForMonsRaceS1Single = 1073,
///<summary>You do not meet the age requirement to purchase a Monster Race Ticket.</summary>
NotMeetAgeRequirementForMonsRace = 1074,
///<summary>The bid amount must be higher than the previous bid.</summary>
BidAmountHigherThanPreviousBid = 1075,
///<summary>The game cannot be terminated at this time.</summary>
GameCannotTerminateNow = 1076,
///<summary>A GameGuard Execution error has occurred. Please send the *.erl file(s) located in the GameGuard folder to game@inca.co.kr.</summary>
GgExecutionError = 1077,
///<summary>When a user's keyboard input exceeds a certain cumulative score a chat ban will be applied. This is done to discourage spamming. Please avoid posting the same message multiple times during a short period.</summary>
DontSpam = 1078,
///<summary>The target is currently banend from chatting.</summary>
TargetIsChatBanned = 1079,
///<summary>Being permanent, are you sure you wish to use the facelift potion - Type A?.</summary>
FaceliftPotionTypeA = 1080,
///<summary>Being permanent, are you sure you wish to use the hair dye potion - Type A?.</summary>
HairdyePotionTypeA = 1081,
///<summary>Do you wish to use the hair style change potion - Type A? It is permanent.</summary>
HairStylePotionTypeA = 1082,
///<summary>Facelift potion - Type A is being applied.</summary>
FaceliftPotionTypeAApplied = 1083,
///<summary>Hair dye potion - Type A is being applied.</summary>
HairdyePotionTypeAApplied = 1084,
///<summary>The hair style chance potion - Type A is being used.</summary>
HairStylePotionTypeAUsed = 1085,
///<summary>Your facial appearance has been changed.</summary>
FaceAppearanceChanged = 1086,
///<summary>Your hair color has changed.</summary>
HairColorChanged = 1087,
///<summary>Your hair style has been changed.</summary>
HairStyleChanged = 1088,
///<summary>$s1 has obtained a first anniversary commemorative item.</summary>
S1ObtainedAnniversaryItem = 1089,
///<summary>Being permanent, are you sure you wish to use the facelift potion - Type B?.</summary>
FaceliftPotionTypeB = 1090,
///<summary>Being permanent, are you sure you wish to use the facelift potion - Type C?.</summary>
FaceliftPotionTypeC = 1091,
///<summary>Being permanent, are you sure you wish to use the hair dye potion - Type B?.</summary>
HairdyePotionTypeB = 1092,
///<summary>Being permanent, are you sure you wish to use the hair dye potion - Type C?.</summary>
HairdyePotionTypeC = 1093,
///<summary>Being permanent, are you sure you wish to use the hair dye potion - Type D?.</summary>
HairdyePotionTypeD = 1094,
///<summary>Do you wish to use the hair style change potion - Type B? It is permanent.</summary>
HairStylePotionTypeB = 1095,
///<summary>Do you wish to use the hair style change potion - Type C? It is permanent.</summary>
HairStylePotionTypeC = 1096,
///<summary>Do you wish to use the hair style change potion - Type D? It is permanent.</summary>
HairStylePotionTypeD = 1097,
///<summary>Do you wish to use the hair style change potion - Type E? It is permanent.</summary>
HairStylePotionTypeE = 1098,
///<summary>Do you wish to use the hair style change potion - Type F? It is permanent.</summary>
HairStylePotionTypeF = 1099,
///<summary>Do you wish to use the hair style change potion - Type G? It is permanent.</summary>
HairStylePotionTypeG = 1100,
///<summary>Facelift potion - Type B is being applied.</summary>
FaceliftPotionTypeBApplied = 1101,
///<summary>Facelift potion - Type C is being applied.</summary>
FaceliftPotionTypeCApplied = 1102,
///<summary>Hair dye potion - Type B is being applied.</summary>
HairdyePotionTypeBApplied = 1103,
///<summary>Hair dye potion - Type C is being applied.</summary>
HairdyePotionTypeCApplied = 1104,
///<summary>Hair dye potion - Type D is being applied.</summary>
HairdyePotionTypeDApplied = 1105,
///<summary>The hair style chance potion - Type B is being used.</summary>
HairStylePotionTypeBUsed = 1106,
///<summary>The hair style chance potion - Type C is being used.</summary>
HairStylePotionTypeCUsed = 1107,
///<summary>The hair style chance potion - Type D is being used.</summary>
HairStylePotionTypeDUsed = 1108,
///<summary>The hair style chance potion - Type E is being used.</summary>
HairStylePotionTypeEUsed = 1109,
///<summary>The hair style chance potion - Type F is being used.</summary>
HairStylePotionTypeFUsed = 1110,
///<summary>The hair style chance potion - Type G is being used.</summary>
HairStylePotionTypeGUsed = 1111,
///<summary>The prize amount for the winner of Lottery #$s1 is $s2 adena. We have $s3 first prize winners.</summary>
AmountForWinnerS1IsS2AdenaWeHaveS3PrizeWinner = 1112,
///<summary>The prize amount for Lucky Lottery #$s1 is $s2 adena. There was no first prize winner in this drawing, therefore the jackpot will be added to the next drawing.</summary>
AmountForLotteryS1IsS2AdenaNoWinner = 1113,
///<summary>Your clan may not register to participate in a siege while under a grace period of the clan's dissolution.</summary>
CantParticipateInSiegeWhileDissolutionInProgress = 1114,
///<summary>Individuals may not surrender during combat.</summary>
IndividualsNotSurrenderDuringCombat = 1115,
///<summary>One cannot leave one's clan during combat.</summary>
YouCannotLeaveDuringCombat = 1116,
///<summary>A clan member may not be dismissed during combat.</summary>
ClanMemberCannotBeDismissedDuringCombat = 1117,
///<summary>Progress in a quest is possible only when your inventory's weight and volume are less than 80 percent of capacity.</summary>
InventoryLessThan80Percent = 1118,
///<summary>Quest was automatically canceled when you attempted to settle the accounts of your quest while your inventory exceeded 80 percent of capacity.</summary>
QuestCanceledInventoryExceeds80Percent = 1119,
///<summary>You are still a member of the clan.</summary>
StillClanMember = 1120,
///<summary>You do not have the right to vote.</summary>
NoRightToVote = 1121,
///<summary>There is no candidate.</summary>
NoCandidate = 1122,
///<summary>Weight and volume limit has been exceeded. That skill is currently unavailable.</summary>
WeightExceededSkillUnavailable = 1123,
///<summary>Your recipe book may not be accessed while using a skill.</summary>
NoRecipeBookWhileCasting = 1124,
///<summary>An item may not be created while engaged in trading.</summary>
CannotCreatedWhileEngagedInTrading = 1125,
///<summary>You cannot enter a negative number.</summary>
NoNegativeNumber = 1126,
///<summary>The reward must be less than 10 times the standard price.</summary>
RewardLessThan10TimesStandardPrice = 1127,
///<summary>A private store may not be opened while using a skill.</summary>
PrivateStoreNotWhileCasting = 1128,
///<summary>This is not allowed while riding a ferry or boat.</summary>
NotAllowedOnBoat = 1129,
///<summary>You have given $s1 damage to your target and $s2 damage to the servitor.</summary>
GivenS1DamageToYourTargetAndS2DamageToServitor = 1130,
///<summary>It is now midnight and the effect of $s1 can be felt.</summary>
NightS1EffectApplies = 1131,
///<summary>It is now dawn and the effect of $s1 will now disappear.</summary>
DayS1EffectDisappears = 1132,
///<summary>Since HP has decreased, the effect of $s1 can be felt.</summary>
HpDecreasedEffectApplies = 1133,
///<summary>Since HP has increased, the effect of $s1 will disappear.</summary>
HpIncreasedEffectDisappears = 1134,
///<summary>While you are engaged in combat, you cannot operate a private store or private workshop.</summary>
CantOperatePrivateStoreDuringCombat = 1135,
///<summary>Since there was an account that used this IP and attempted to log in illegally, this account is not allowed to connect to the game server for $s1 minutes. Please use another game server.</summary>
AccountNotAllowedToConnect = 1136,
///<summary>$s1 harvested $s3 $s2(s).</summary>
S1HarvestedS3S2S = 1137,
///<summary>$s1 harvested $s2(s).</summary>
S1HarvestedS2S = 1138,
///<summary>The weight and volume limit of your inventory must not be exceeded.</summary>
InventoryLimitMustNotBeExceeded = 1139,
///<summary>Would you like to open the gate?.</summary>
WouldYouLikeToOpenTheGate = 1140,
///<summary>Would you like to close the gate?.</summary>
WouldYouLikeToCloseTheGate = 1141,
///<summary>Since $s1 already exists nearby, you cannot summon it again.</summary>
CannotSummonS1Again = 1142,
///<summary>Since you do not have enough items to maintain the servitor's stay, the servitor will disappear.</summary>
ServitorDisappearedNotEnoughItems = 1143,
///<summary>Currently, you don't have anybody to chat with in the game.</summary>
NobodyInGameToChat = 1144,
///<summary>$s2 has been created for $s1 after the payment of $s3 adena is received.</summary>
S2CreatedForS1ForS3Adena = 1145,
///<summary>$s1 created $s2 after receiving $s3 adena.</summary>
S1CreatedS2ForS3Adena = 1146,
///<summary>$s2 $s3 have been created for $s1 at the price of $s4 adena.</summary>
S2S3SCreatedForS1ForS4Adena = 1147,
///<summary>$s1 created $s2 $s3 at the price of $s4 adena.</summary>
S1CreatedS2S3SForS4Adena = 1148,
///<summary>Your attempt to create $s2 for $s1 at the price of $s3 adena has failed.</summary>
CreationOfS2ForS1AtS3AdenaFailed = 1149,
///<summary>$s1 has failed to create $s2 at the price of $s3 adena.</summary>
S1FailedToCreateS2ForS3Adena = 1150,
///<summary>$s2 is sold to $s1 at the price of $s3 adena.</summary>
S2SoldToS1ForS3Adena = 1151,
///<summary>$s2 $s3 have been sold to $s1 for $s4 adena.</summary>
S3S2SSoldToS1ForS4Adena = 1152,
///<summary>$s2 has been purchased from $s1 at the price of $s3 adena.</summary>
S2PurchasedFromS1ForS3Adena = 1153,
///<summary>$s3 $s2 has been purchased from $s1 for $s4 adena.</summary>
S3S2SPurchasedFromS1ForS4Adena = 1154,
///<summary>+$s2 $s3 have been sold to $s1 for $s4 adena.</summary>
S3S2SoldToS1ForS4Adena = 1155,
///<summary>+$s2 $s3 has been purchased from $s1 for $s4 adena.</summary>
S2S3PurchasedFromS1ForS4Adena = 1156,
///<summary>Trying on state lasts for only 5 seconds. When a character's state changes, it can be cancelled.</summary>
TryingOnState = 1157,
///<summary>You cannot dismount from this elevation.</summary>
CannotDismountFromElevation = 1158,
///<summary>The ferry from Talking Island will arrive at Gludin Harbor in approximately 10 minutes.</summary>
FerryFromTalkingArriveAtGludin10Minutes = 1159,
///<summary>The ferry from Talking Island will be arriving at Gludin Harbor in approximately 5 minutes.</summary>
FerryFromTalkingArriveAtGludin5Minutes = 1160,
///<summary>The ferry from Talking Island will be arriving at Gludin Harbor in approximately 1 minute.</summary>
FerryFromTalkingArriveAtGludin1Minute = 1161,
///<summary>The ferry from Giran Harbor will be arriving at Talking Island in approximately 15 minutes.</summary>
FerryFromGiranArriveAtTalking15Minutes = 1162,
///<summary>The ferry from Giran Harbor will be arriving at Talking Island in approximately 10 minutes.</summary>
FerryFromGiranArriveAtTalking10Minutes = 1163,
///<summary>The ferry from Giran Harbor will be arriving at Talking Island in approximately 5 minutes.</summary>
FerryFromGiranArriveAtTalking5Minutes = 1164,
///<summary>The ferry from Giran Harbor will be arriving at Talking Island in approximately 1 minute.</summary>
FerryFromGiranArriveAtTalking1Minute = 1165,
///<summary>The ferry from Talking Island will be arriving at Giran Harbor in approximately 20 minutes.</summary>
FerryFromTalkingArriveAtGiran20Minutes = 1166,
///<summary>The ferry from Talking Island will be arriving at Giran Harbor in approximately 20 minutes.</summary>
FerryFromTalkingArriveAtGiran15Minutes = 1167,
///<summary>The ferry from Talking Island will be arriving at Giran Harbor in approximately 20 minutes.</summary>
FerryFromTalkingArriveAtGiran10Minutes = 1168,
///<summary>The ferry from Talking Island will be arriving at Giran Harbor in approximately 20 minutes.</summary>
FerryFromTalkingArriveAtGiran5Minutes = 1169,
///<summary>The ferry from Talking Island will be arriving at Giran Harbor in approximately 1 minute.</summary>
FerryFromTalkingArriveAtGiran1Minute = 1170,
///<summary>The Innadril pleasure boat will arrive in approximately 20 minutes.</summary>
InnadrilBoatArrive20Minutes = 1171,
///<summary>The Innadril pleasure boat will arrive in approximately 15 minutes.</summary>
InnadrilBoatArrive15Minutes = 1172,
///<summary>The Innadril pleasure boat will arrive in approximately 10 minutes.</summary>
InnadrilBoatArrive10Minutes = 1173,
///<summary>The Innadril pleasure boat will arrive in approximately 5 minutes.</summary>
InnadrilBoatArrive5Minutes = 1174,
///<summary>The Innadril pleasure boat will arrive in approximately 1 minute.</summary>
InnadrilBoatArrive1Minute = 1175,
///<summary>This is a quest event period.</summary>
QuestEventPeriod = 1176,
///<summary>This is the seal validation period.</summary>
ValidationPeriod = 1177,
///<summary>Seal of Avarice description.</summary>
AvariceDescription = 1178,
///<summary>Seal of Gnosis description.</summary>
GnosisDescription = 1179,
///<summary>Seal of Strife description.</summary>
StrifeDescription = 1180,
///<summary>Do you really wish to change the title?.</summary>
ChangeTitleConfirm = 1181,
///<summary>Are you sure you wish to delete the clan crest?.</summary>
CrestDeleteConfirm = 1182,
///<summary>This is the initial period.</summary>
InitialPeriod = 1183,
///<summary>This is a period of calculating statistics in the server.</summary>
ResultsPeriod = 1184,
///<summary>days left until deletion.</summary>
DaysLeftUntilDeletion = 1185,
///<summary>To create a new account, please visit the PlayNC website (http://www.plaync.com/us/support/).</summary>
ToCreateAccountVisitWebsite = 1186,
///<summary>If you forgotten your account information or password, please visit the Support Center on the PlayNC website(http://www.plaync.com/us/support/).</summary>
AccountInformationForgottonVisitWebsite = 1187,
///<summary>Your selected target can no longer receive a recommendation.</summary>
YourTargetNoLongerReceiveARecommendation = 1188,
///<summary>This temporary alliance of the Castle Attacker team is in effect. It will be dissolved when the Castle Lord is replaced.</summary>
TemporaryAlliance = 1189,
///<summary>This temporary alliance of the Castle Attacker team has been dissolved.</summary>
TemporaryAllianceDissolved = 1189,
///<summary>The ferry from Gludin Harbor will be arriving at Talking Island in approximately 10 minutes.</summary>
FerryFromGludinArriveAtTalking10Minutes = 1191,
///<summary>The ferry from Gludin Harbor will be arriving at Talking Island in approximately 5 minutes.</summary>
FerryFromGludinArriveAtTalking5Minutes = 1192,
///<summary>The ferry from Gludin Harbor will be arriving at Talking Island in approximately 1 minute.</summary>
FerryFromGludinArriveAtTalking1Minute = 1193,
///<summary>A mercenary can be assigned to a position from the beginning of the Seal Validatio period until the time when a siege starts.</summary>
MercCanBeAssigned = 1194,
///<summary>This mercenary cannot be assigned to a position by using the Seal of Strife.</summary>
MercCantBeAssignedUsingStrife = 1195,
///<summary>Your force has reached maximum capacity.</summary>
ForceMaximum = 1196,
///<summary>Summoning a servitor costs $s2 $s1.</summary>
SummoningServitorCostsS2S1 = 1197,
///<summary>The item has been successfully crystallized.</summary>
CrystallizationSuccessful = 1198,
///<summary>=======Clan War Target=======.</summary>
ClanWarHeader = 1199,
///<summary>Message:($s1 ($s2 Alliance).</summary>
S1S2Alliance = 1200,
///<summary>Please select the quest you wish to abort.</summary>
SelectQuestToAbor = 1201,
///<summary>Message:($s1 (No alliance exists).</summary>
S1NoAlliExists = 1202,
///<summary>There is no clan war in progress.</summary>
NoWarInProgress = 1203,
///<summary>The screenshot has been saved. ($s1 $s2x$s3).</summary>
Screenshot = 1204,
///<summary>Your mailbox is full. There is a 100 message limit.</summary>
MailboxFull = 1205,
///<summary>The memo box is full. There is a 100 memo limit.</summary>
MemoboxFull = 1206,
///<summary>Please make an entry in the field.</summary>
MakeAnEntry = 1207,
///<summary>$s1 died and dropped $s3 $s2.</summary>
S1DiedDroppedS3S2 = 1208,
///<summary>Congratulations. Your raid was successful.</summary>
RaidWasSuccessful = 1209,
///<summary>Seven Signs: The quest event period has begun. Visit a Priest of Dawn or Priestess of Dusk to participate in the event.</summary>
QuestEventPeriodBegun = 1210,
///<summary>Seven Signs: The quest event period has ended. The next quest event will start in one week.</summary>
QuestEventPeriodEnded = 1211,
///<summary>Seven Signs: The Lords of Dawn have obtained the Seal of Avarice.</summary>
DawnObtainedAvarice = 1212,
///<summary>Seven Signs: The Lords of Dawn have obtained the Seal of Gnosis.</summary>
DawnObtainedGnosis = 1213,
///<summary>Seven Signs: The Lords of Dawn have obtained the Seal of Strife.</summary>
DawnObtainedStrife = 1214,
///<summary>Seven Signs: The Revolutionaries of Dusk have obtained the Seal of Avarice.</summary>
DuskObtainedAvarice = 1215,
///<summary>Seven Signs: The Revolutionaries of Dusk have obtained the Seal of Gnosis.</summary>
DuskObtainedGnosis = 1216,
///<summary>Seven Signs: The Revolutionaries of Dusk have obtained the Seal of Strife.</summary>
DuskObtainedStrife = 1217,
///<summary>Seven Signs: The Seal Validation period has begun.</summary>
SealValidationPeriodBegun = 1218,
///<summary>Seven Signs: The Seal Validation period has ended.</summary>
SealValidationPeriodEnded = 1219,
///<summary>Are you sure you wish to summon it?.</summary>
SummonConfirm = 1220,
///<summary>Are you sure you wish to return it?.</summary>
ReturnConfirm = 1221,
///<summary>Current location : $s1, $s2, $s3 (GM Consultation Service).</summary>
LocGmConsulationServiceS1S2S3 = 1222,
///<summary>We depart for Talking Island in five minutes.</summary>
DepartForTalking5Minutes = 1223,
///<summary>We depart for Talking Island in one minute.</summary>
DepartForTalking1Minute = 1224,
///<summary>All aboard for Talking Island.</summary>
DepartForTalking = 1225,
///<summary>We are now leaving for Talking Island.</summary>
LeavingForTalking = 1226,
///<summary>You have $s1 unread messages.</summary>
S1UnreadMessages = 1227,
///<summary>$s1 has blocked you. You cannot send mail to $s1.</summary>
S1BlockedYouCannotMail = 1228,
///<summary>No more messages may be sent at this time. Each account is allowed 10 messages per day.</summary>
NoMoreMessagesToday = 1229,
///<summary>You are limited to five recipients at a time.</summary>
OnlyFiveRecipients = 1230,
///<summary>You've sent mail.</summary>
SentMail = 1231,
///<summary>The message was not sent.</summary>
MessageNotSent = 1232,
///<summary>You've got mail.</summary>
NewMail = 1233,
///<summary>The mail has been stored in your temporary mailbox.</summary>
MailStoredInMailbox = 1234,
///<summary>Do you wish to delete all your friends?.</summary>
AllFriendsDeleteConfirm = 1235,
///<summary>Please enter security card number.</summary>
EnterSecurityCardNumber = 1236,
///<summary>Please enter the card number for number $s1.</summary>
EnterCardNumberForS1 = 1237,
///<summary>Your temporary mailbox is full. No more mail can be stored; you have reached the 10 message limit.</summary>
TempMailboxFull = 1238,
///<summary>The keyboard security module has failed to load. Please exit the game and try again.</summary>
KeyboardModuleFailedLoad = 1239,
///<summary>Seven Signs: The Revolutionaries of Dusk have won.</summary>
DuskWon = 1240,
///<summary>Seven Signs: The Lords of Dawn have won.</summary>
DawnWon = 1241,
///<summary>Users who have not verified their age may not log in between the hours if 10:00 p.m. and 6:00 a.m.</summary>
NotVerifiedAgeNoLogin = 1242,
///<summary>The security card number is invalid.</summary>
SecurityCardNumberInvalid = 1243,
///<summary>Users who have not verified their age may not log in between the hours if 10:00 p.m. and 6:00 a.m. Logging off now.</summary>
NotVerifiedAgeLogOff = 1244,
///<summary>You will be loged out in $s1 minutes.</summary>
LogoutInS1Minutes = 1245,
///<summary>$s1 died and has dropped $s2 adena.</summary>
S1DiedDroppedS2Adena = 1246,
///<summary>The corpse is too old. The skill cannot be used.</summary>
CorpseTooOldSkillNotUsed = 1247,
///<summary>You are out of feed. Mount status canceled.</summary>
OutOfFeedMountCanceled = 1248,
///<summary>You may only ride a wyvern while you're riding a strider.</summary>
YouMayOnlyRideWyvernWhileRidingStrider = 1249,
///<summary>Do you really want to surrender? If you surrender during an alliance war, your Exp will drop the same as if you were to die once.</summary>
SurrenderAllyWarConfirm = 1250,
///<summary>you will not be able to accept another clan to your alliance for one day.</summary>
DismissAllyConfirm = 1251,
///<summary>Are you sure you want to surrender? Exp penalty will be the same as death.</summary>
SurrenderConfirm1 = 1252,
///<summary>Are you sure you want to surrender? Exp penalty will be the same as death and you will not be allowed to participate in clan war.</summary>
SurrenderConfirm2 = 1253,
///<summary>Thank you for submitting feedback.</summary>
ThanksForFeedback = 1254,
///<summary>GM consultation has begun.</summary>
GmConsultationBegun = 1255,
///<summary>Please write the name after the command.</summary>
PleaseWriteNameAfterCommand = 1256,
///<summary>The special skill of a servitor or pet cannot be registerd as a macro.</summary>
PetSkillNotAsMacro = 1257,
///<summary>$s1 has been crystallized.</summary>
S1Crystallized = 1258,
///<summary>=======Alliance Target=======.</summary>
AllianceTargetHeader = 1259,
///<summary>Seven Signs: Preparations have begun for the next quest event.</summary>
PreparationsPeriodBegun = 1260,
///<summary>Seven Signs: The quest event period has begun. Speak with a Priest of Dawn or Dusk Priestess if you wish to participate in the event.</summary>
CompetitionPeriodBegun = 1261,
///<summary>Seven Signs: Quest event has ended. Results are being tallied.</summary>
ResultsPeriodBegun = 1262,
///<summary>Seven Signs: This is the seal validation period. A new quest event period begins next Monday.</summary>
ValidationPeriodBegun = 1263,
///<summary>This soul stone cannot currently absorb souls. Absorption has failed.</summary>
StoneCannotAbsorb = 1264,
///<summary>You can't absorb souls without a soul stone.</summary>
CantAbsorbWithoutStone = 1265,
///<summary>The exchange has ended.</summary>
ExchangeHasEnded = 1266,
///<summary>Your contribution score is increased by $s1.</summary>
ContribScoreIncreasedS1 = 1267,
///<summary>Do you wish to add class as your sub class?.</summary>
AddSubclassConfirm = 1268,
///<summary>The new sub class has been added.</summary>
AddNewSubclass = 1269,
///<summary>The transfer of sub class has been completed.</summary>
SubclassTransferCompleted = 1270,
///<summary>Do you wish to participate? Until the next seal validation period, you are a member of the Lords of Dawn.</summary>
DawnConfirm = 1271,
///<summary>Do you wish to participate? Until the next seal validation period, you are a member of the Revolutionaries of Dusk.</summary>
DuskConfirm = 1271,
///<summary>You will participate in the Seven Signs as a member of the Lords of Dawn.</summary>
SevensignsPartecipationDawn = 1273,
///<summary>You will participate in the Seven Signs as a member of the Revolutionaries of Dusk.</summary>
SevensignsPartecipationDusk = 1274,
///<summary>You've chosen to fight for the Seal of Avarice during this quest event period.</summary>
FightForAvarice = 1275,
///<summary>You've chosen to fight for the Seal of Gnosis during this quest event period.</summary>
FightForGnosis = 1276,
///<summary>You've chosen to fight for the Seal of Strife during this quest event period.</summary>
FightForStrife = 1277,
///<summary>The NPC server is not operating at this time.</summary>
NpcServerNotOperating = 1278,
///<summary>Contribution level has exceeded the limit. You may not continue.</summary>
ContribScoreExceeded = 1279,
///<summary>Magic Critical Hit!.</summary>
CriticalHitMagic = 1280,
///<summary>Your excellent shield defense was a success!.</summary>
YourExcellentShieldDefenseWasASuccess = 1281,
///<summary>Your Karma has been changed to $s1.</summary>
YourKarmaHasBeenChangedToS1 = 1282,
///<summary>The minimum frame option has been activated.</summary>
MinimumFrameActivated = 1283,
///<summary>The minimum frame option has been deactivated.</summary>
MinimumFrameDeactivated = 1284,
///<summary>No inventory exists: You cannot purchase an item.</summary>
NoInventoryCannotPurchase = 1285,
///<summary>(Until next Monday at 6:00 p.m.).</summary>
UntilMonday_6Pm = 1286,
///<summary>(Until today at 6:00 p.m.).</summary>
UntilToday_6Pm = 1287,
///<summary>If trends continue, $s1 will win and the seal will belong to:.</summary>
S1WillWinCompetition = 1288,
///<summary>(Until next Monday at 6:00 p.m.).</summary>
SealOwned10MoreVoted = 1289,
///<summary>Although the seal was not owned, since 35 percent or more people have voted.</summary>
SealNotOwned35MoreVoted = 1290,
///<summary>because less than 10 percent of people have voted.</summary>
SealOwned10LessVoted = 1291,
///<summary>and since less than 35 percent of people have voted.</summary>
SealNotOwned35LessVoted = 1292,
///<summary>If current trends continue, it will end in a tie.</summary>
CompetitionWillTie = 1293,
///<summary>The competition has ended in a tie. Therefore, nobody has been awarded the seal.</summary>
CompetitionTieSealNotAwarded = 1294,
///<summary>Sub classes may not be created or changed while a skill is in use.</summary>
SubclassNoChangeOrCreateWhileSkillInUse = 1295,
///<summary>You cannot open a Private Store here.</summary>
NoPrivateStoreHere = 1296,
///<summary>You cannot open a Private Workshop here.</summary>
NoPrivateWorkshopHere = 1297,
///<summary>Please confirm that you would like to exit the Monster Race Track.</summary>
MonsExitConfirm = 1298,
///<summary>$s1's casting has been interrupted.</summary>
S1CastingInterrupted = 1299,
///<summary>You are no longer trying on equipment.</summary>
WearItemsStopped = 1300,
///<summary>Only a Lord of Dawn may use this.</summary>
CanBeUsedByDawn = 1301,
///<summary>Only a Revolutionary of Dusk may use this.</summary>
CanBeUsedByDusk = 1302,
///<summary>This may only be used during the quest event period.</summary>
CanBeUsedDuringQuestEventPeriod = 1303,
///<summary>except for an Alliance with a castle owning clan.</summary>
StrifeCanceledDefensiveRegistration = 1304,
///<summary>Seal Stones may only be transferred during the quest event period.</summary>
SealStonesOnlyWhileQuest = 1305,
///<summary>You are no longer trying on equipment.</summary>
NoLongerTryingOn = 1306,
///<summary>Only during the seal validation period may you settle your account.</summary>
SettleAccountOnlyInSealValidation = 1307,
///<summary>Congratulations - You've completed a class transfer!.</summary>
ClassTransfer = 1308,
///<summary>Message:To use this option, you must have the lastest version of MSN Messenger installed on your computer.</summary>
LatestMsnRequired = 1309,
///<summary>For full functionality, the latest version of MSN Messenger must be installed on your computer.</summary>
LatestMsnRecommended = 1310,
///<summary>Previous versions of MSN Messenger only provide the basic features for in-game MSN Messenger Chat. Add/Delete Contacts and other MSN Messenger options are not available.</summary>
MsnOnlyBasic = 1311,
///<summary>The latest version of MSN Messenger may be obtained from the MSN web site (http://messenger.msn.com).</summary>
MsnObtainedFrom = 1312,
///<summary>$s1, to better serve our customers, all chat histories [...].</summary>
S1ChatHistoriesStored = 1313,
///<summary>Please enter the passport ID of the person you wish to add to your contact list.</summary>
EnterPassportForAdding = 1314,
///<summary>Deleting a contact will remove that contact from MSN Messenger as well. The contact can still check your online status and well not be blocked from sending you a message.</summary>
DeletingAContact = 1315,
///<summary>The contact will be deleted and blocked from your contact list.</summary>
ContactWillDeleted = 1316,
///<summary>Would you like to delete this contact?.</summary>
ContactDeleteConfirm = 1317,
///<summary>Please select the contact you want to block or unblock.</summary>
SelectContactForBlockUnblock = 1318,
///<summary>Please select the name of the contact you wish to change to another group.</summary>
SelectContactForChangeGroup = 1319,
///<summary>After selecting the group you wish to move your contact to, press the OK button.</summary>
SelectGroupPressOk = 1320,
///<summary>Enter the name of the group you wish to add.</summary>
EnterGroupName = 1321,
///<summary>Select the group and enter the new name.</summary>
SelectGroupEnterName = 1322,
///<summary>Select the group you wish to delete and click the OK button.</summary>
SelectGroupToDelete = 1323,
///<summary>Signing in.</summary>
SigningIn = 1324,
///<summary>You've logged into another computer and have been logged out of the .NET Messenger Service on this computer.</summary>
AnotherComputerLogout = 1325,
///<summary>$s1 :.</summary>
S1D = 1326,
///<summary>The following message could not be delivered:.</summary>
MessageNotDelivered = 1327,
///<summary>Members of the Revolutionaries of Dusk will not be resurrected.</summary>
DuskNotResurrected = 1328,
///<summary>You are currently blocked from using the Private Store and Private Workshop.</summary>
BlockedFromUsingStore = 1329,
///<summary>You may not open a Private Store or Private Workshop for another $s1 minute(s).</summary>
NoStoreForS1Minutes = 1330,
///<summary>You are no longer blocked from using the Private Store and Private Workshop.</summary>
NoLongerBlockedUsingStore = 1331,
///<summary>Items may not be used after your character or pet dies.</summary>
NoItemsAfterDeath = 1332,
///<summary>The replay file is not accessible. Please verify that the replay.ini exists in your Linage 2 directory.</summary>
ReplayInaccessible = 1333,
///<summary>The new camera data has been stored.</summary>
NewCameraStored = 1334,
///<summary>The attempt to store the new camera data has failed.</summary>
CameraStoringFailed = 1335,
///<summary>The replay file, $s1.$$s2 has been corrupted, please check the fle.</summary>
ReplayS1S2Corrupted = 1336,
///<summary>This will terminate the replay. Do you wish to continue?.</summary>
ReplayTerminateConfirm = 1337,
///<summary>You have exceeded the maximum amount that may be transferred at one time.</summary>
ExceededMaximumAmount = 1338,
///<summary>Once a macro is assigned to a shortcut, it cannot be run as a macro again.</summary>
MacroShortcutNotRun = 1339,
///<summary>This server cannot be accessed by the coupon you are using.</summary>
ServerNotAccessedByCoupon = 1340,
///<summary>Incorrect name and/or email address.</summary>
IncorrectNameOrAddress = 1341,
///<summary>You are already logged in.</summary>
AlreadyLoggedIn = 1342,
///<summary>Incorrect email address and/or password. Your attempt to log into .NET Messenger Service has failed.</summary>
IncorrectAddressOrPassword = 1343,
///<summary>Your request to log into the .NET Messenger service has failed. Please verify that you are currently connected to the internet.</summary>
NetLoginFailed = 1344,
///<summary>Click the OK button after you have selected a contact name.</summary>
SelectContactClickOk = 1345,
///<summary>You are currently entering a chat message.</summary>
CurrentlyEnteringChat = 1346,
///<summary>The Linage II messenger could not carry out the task you requested.</summary>
MessengerFailedCarryingOutTask = 1347,
///<summary>$s1 has entered the chat room.</summary>
S1EnteredChatRoom = 1348,
///<summary>$s1 has left the chat room.</summary>
S1LeftChatRoom = 1349,
///<summary>The state will be changed to indicate "off-line." All the chat windows currently opened will be closed.</summary>
GoingOffline = 1350,
///<summary>Click the Delete button after selecting the contact you wish to remove.</summary>
SelectContactClickRemove = 1351,
///<summary>You have been added to $s1 ($s2)'s contact list.</summary>
AddedToS1S2ContactList = 1352,
///<summary>You can set the option to show your status as always being off-line to all of your contacts.</summary>
CanSetOptionToAlwaysShowOffline = 1353,
///<summary>You are not allowed to chat with a contact while chatting block is imposed.</summary>
NoChatWhileBlocked = 1354,
///<summary>The contact is currently blocked from chatting.</summary>
ContactCurrentlyBlocked = 1355,
///<summary>The contact is not currently logged in.</summary>
ContactCurrentlyOffline = 1356,
///<summary>You have been blocked from chatting with that contact.</summary>
YouAreBlocked = 1357,
///<summary>You are being logged out.</summary>
YouAreLoggingOut = 1358,
///<summary>$s1 has logged in.</summary>
S1LoggedIn2 = 1359,
///<summary>You have received a message from $s1.</summary>
GotMessageFromS1 = 1360,
///<summary>Due to a system error, you have been logged out of the .NET Messenger Service.</summary>
LoggedOutDueToError = 1361,
///<summary>click the button next to My Status and then use the Options menu.</summary>
SelectContactToDelete = 1362,
///<summary>Your request to participate in the alliance war has been denied.</summary>
YourRequestAllianceWarDenied = 1363,
///<summary>The request for an alliance war has been rejected.</summary>
RequestAllianceWarRejected = 1364,
///<summary>$s2 of $s1 clan has surrendered as an individual.</summary>
S2OfS1SurrenderedAsIndividual = 1365,
///<summary>In order to delete a group, you must not [...].</summary>
DelteGroupInstruction = 1366,
///<summary>Only members of the group are allowed to add records.</summary>
OnlyGroupCanAddRecords = 1367,
///<summary>You can not try those items on at the same time.</summary>
YouCanNotTryThoseItemsOnAtTheSameTime = 1368,
///<summary>You've exceeded the maximum.</summary>
ExceededTheMaximum = 1369,
///<summary>Your message to $s1 did not reach its recipient. You cannot send mail to the GM staff.</summary>
CannotMailGmS1 = 1370,
///<summary>It has been determined that you're not engaged in normal gameplay and a restriction has been imposed upon you. You may not move for $s1 minutes.</summary>
GameplayRestrictionPenaltyS1 = 1371,
///<summary>Your punishment will continue for $s1 minutes.</summary>
PunishmentContinueS1Minutes = 1372,
///<summary>$s1 has picked up $s2 that was dropped by a Raid Boss.</summary>
S1ObtainedS2FromRaidboss = 1373,
///<summary>$s1 has picked up $s3 $s2(s) that was dropped by a Raid Boss.</summary>
S1PickedUpS3S2SFromRaidboss = 1374,
///<summary>$s1 has picked up $s2 adena that was dropped by a Raid Boss.</summary>
S1ObtainedS2AdenaFromRaidboss = 1375,
///<summary>$s1 has picked up $s2 that was dropped by another character.</summary>
S1ObtainedS2FromAnotherCharacter = 1376,
///<summary>$s1 has picked up $s3 $s2(s) that was dropped by a another character.</summary>
S1PickedUpS3S2SFromAnotherCharacter = 1377,
///<summary>$s1 has picked up +$s3 $s2 that was dropped by a another character.</summary>
S1PickedUpS3S2FromAnotherCharacter = 1378,
///<summary>$s1 has obtained $s2 adena.</summary>
S1ObtainedS2Adena = 1379,
///<summary>You can't summon a $s1 while on the battleground.</summary>
CantSummonS1OnBattleground = 1380,
///<summary>The party leader has obtained $s2 of $s1.</summary>
LeaderObtainedS2OfS1 = 1381,
///<summary>To fulfill the quest, you must bring the chosen weapon. Are you sure you want to choose this weapon?.</summary>
ChooseWeaponConfirm = 1382,
///<summary>Are you sure you want to exchange?.</summary>
ExchangeConfirm = 1383,
///<summary>$s1 has become the party leader.</summary>
S1HasBecomeAPartyLeader = 1384,
///<summary>You are not allowed to dismount at this location.</summary>
NoDismountHere = 1385,
///<summary>You are no longer held in place.</summary>
NoLongerHeldInPlace = 1386,
///<summary>Please select the item you would like to try on.</summary>
SelectItemToTryOn = 1387,
///<summary>A party room has been created.</summary>
PartyRoomCreated = 1388,
///<summary>The party room's information has been revised.</summary>
PartyRoomRevised = 1389,
///<summary>You are not allowed to enter the party room.</summary>
PartyRoomForbidden = 1390,
///<summary>You have exited from the party room.</summary>
PartyRoomExited = 1391,
///<summary>$s1 has left the party room.</summary>
S1LeftPartyRoom = 1392,
///<summary>You have been ousted from the party room.</summary>
OustedFromPartyRoom = 1393,
///<summary>$s1 has been kicked from the party room.</summary>
S1KickedFromPartyRoom = 1394,
///<summary>The party room has been disbanded.</summary>
PartyRoomDisbanded = 1395,
///<summary>The list of party rooms can only be viewed by a person who has not joined a party or who is currently the leader of a party.</summary>
CantViewPartyRooms = 1396,
///<summary>The leader of the party room has changed.</summary>
PartyRoomLeaderChanged = 1397,
///<summary>We are recruiting party members.</summary>
RecruitingPartyMembers = 1398,
///<summary>Only the leader of the party can transfer party leadership to another player.</summary>
OnlyAPartyLeaderCanTransferOnesRightsToAnotherPlayer = 1399,
///<summary>Please select the person you wish to make the party leader.</summary>
PleaseSelectThePersonToWhomYouWouldLikeToTransferTheRightsOfAPartyLeader = 1400,
///<summary>Slow down.you are already the party leader.</summary>
YouCannotTransferRightsToYourself = 1401,
///<summary>You may only transfer party leadership to another member of the party.</summary>
YouCanTransferRightsOnlyToAnotherPartyMember = 1402,
///<summary>You have failed to transfer the party leadership.</summary>
YouHaveFailedToTransferThePartyLeaderRights = 1403,
///<summary>The owner of the private manufacturing store has changed the price for creating this item. Please check the new price before trying again.</summary>
ManufacturePriceHasChanged = 1404,
///<summary>$s1 CPs have been restored.</summary>
S1CpWillBeRestored = 1405,
///<summary>$s2 CPs has been restored by $s1.</summary>
S2CpWillBeRestoredByS1 = 1406,
///<summary>You are using a computer that does not allow you to log in with two accounts at the same time.</summary>
NoLoginWithTwoAccounts = 1407,
///<summary>Your prepaid remaining usage time is $s1 hours and $s2 minutes. You have $s3 paid reservations left.</summary>
PrepaidLeftS1S2S3 = 1408,
///<summary>Your prepaid usage time has expired. Your new prepaid reservation will be used. The remaining usage time is $s1 hours and $s2 minutes.</summary>
PrepaidExpiredS1S2 = 1409,
///<summary>Your prepaid usage time has expired. You do not have any more prepaid reservations left.</summary>
PrepaidExpired = 1410,
///<summary>The number of your prepaid reservations has changed.</summary>
PrepaidChanged = 1411,
///<summary>Your prepaid usage time has $s1 minutes left.</summary>
PrepaidLeftS1 = 1412,
///<summary>You do not meet the requirements to enter that party room.</summary>
CantEnterPartyRoom = 1413,
///<summary>The width and length should be 100 or more grids and less than 5000 grids respectively.</summary>
WrongGridCount = 1414,
///<summary>The command file is not sent.</summary>
CommandFileNotSent = 1415,
///<summary>The representative of Team 1 has not been selected.</summary>
Team1NoRepresentative = 1416,
///<summary>The representative of Team 2 has not been selected.</summary>
Team2NoRepresentative = 1417,
///<summary>The name of Team 1 has not yet been chosen.</summary>
Team1NoName = 1418,
///<summary>The name of Team 2 has not yet been chosen.</summary>
Team2NoName = 1419,
///<summary>The name of Team 1 and the name of Team 2 are identical.</summary>
TeamNameIdentical = 1420,
///<summary>The race setup file has not been designated.</summary>
RaceSetupFile1 = 1421,
///<summary>Race setup file error - BuffCnt is not specified.</summary>
RaceSetupFile2 = 1422,
///<summary>Race setup file error - BuffID$s1 is not specified.</summary>
RaceSetupFile3 = 1423,
///<summary>Race setup file error - BuffLv$s1 is not specified.</summary>
RaceSetupFile4 = 1424,
///<summary>Race setup file error - DefaultAllow is not specified.</summary>
RaceSetupFile5 = 1425,
///<summary>Race setup file error - ExpSkillCnt is not specified.</summary>
RaceSetupFile6 = 1426,
///<summary>Race setup file error - ExpSkillID$s1 is not specified.</summary>
RaceSetupFile7 = 1427,
///<summary>Race setup file error - ExpItemCnt is not specified.</summary>
RaceSetupFile8 = 1428,
///<summary>Race setup file error - ExpItemID$s1 is not specified.</summary>
RaceSetupFile9 = 1429,
///<summary>Race setup file error - TeleportDelay is not specified.</summary>
RaceSetupFile10 = 1430,
///<summary>The race will be stopped temporarily.</summary>
RaceStoppedTemporarily = 1431,
///<summary>Your opponent is currently in a petrified state.</summary>
OpponentPetrified = 1432,
///<summary>You will now automatically apply $s1 to your target.</summary>
UseOfS1WillBeAuto = 1433,
///<summary>You will no longer automatically apply $s1 to your weapon.</summary>
AutoUseOfS1Cancelled = 1434,
///<summary>Due to insufficient $s1, the automatic use function has been deactivated.</summary>
AutoUseCancelledLackOfS1 = 1435,
///<summary>Due to insufficient $s1, the automatic use function cannot be activated.</summary>
CannotAutoUseLackOfS1 = 1436,
///<summary>Players are no longer allowed to play dice. Dice can no longer be purchased from a village store. However, you can still sell them to any village store.</summary>
DiceNoLongerAllowed = 1437,
///<summary>There is no skill that enables enchant.</summary>
ThereIsNoSkillThatEnablesEnchant = 1438,
///<summary>You do not have all of the items needed to enchant that skill.</summary>
YouDontHaveAllOfTheItemsNeededToEnchantThatSkill = 1439,
///<summary>You have succeeded in enchanting the skill $s1.</summary>
YouHaveSucceededInEnchantingTheSkillS1 = 1440,
///<summary>Skill enchant failed. The skill will be initialized.</summary>
YouHaveFailedToEnchantTheSkillS1 = 1441,
///<summary>You do not have enough SP to enchant that skill.</summary>
YouDontHaveEnoughSpToEnchantThatSkill = 1443,
///<summary>You do not have enough experience (Exp) to enchant that skill.</summary>
YouDontHaveEnoughExpToEnchantThatSkill = 1444,
///<summary>Your previous subclass will be removed and replaced with the new subclass at level 40. Do you wish to continue?.</summary>
ReplaceSubclassConfirm = 1445,
///<summary>The ferry from $s1 to $s2 has been delayed.</summary>
FerryFromS1ToS2Delayed = 1446,
///<summary>You cannot do that while fishing.</summary>
CannotDoWhileFishing1 = 1447,
///<summary>Only fishing skills may be used at this time.</summary>
OnlyFishingSkillsNow = 1448,
///<summary>You've got a bite!.</summary>
GotABite = 1449,
///<summary>That fish is more determined than you are - it spit the hook!.</summary>
FishSpitTheHook = 1450,
///<summary>Your bait was stolen by that fish!.</summary>
BaitStolenByFish = 1451,
///<summary>Baits have been lost because the fish got away.</summary>
BaitLostFishGotAway = 1452,
///<summary>You do not have a fishing pole equipped.</summary>
FishingPoleNotEquipped = 1453,
///<summary>You must put bait on your hook before you can fish.</summary>
BaitOnHookBeforeFishing = 1454,
///<summary>You cannot fish while under water.</summary>
CannotFishUnderWater = 1455,
///<summary>You cannot fish while riding as a passenger of a boat - it's against the rules.</summary>
CannotFishOnBoat = 1456,
///<summary>You can't fish here.</summary>
CannotFishHere = 1457,
///<summary>Your attempt at fishing has been cancelled.</summary>
FishingAttemptCancelled = 1458,
///<summary>You do not have enough bait.</summary>
NotEnoughBait = 1459,
///<summary>You reel your line in and stop fishing.</summary>
ReelLineAndStopFishing = 1460,
///<summary>You cast your line and start to fish.</summary>
CastLineAndStartFishing = 1461,
///<summary>You may only use the Pumping skill while you are fishing.</summary>
CanUsePumpingOnlyWhileFishing = 1462,
///<summary>You may only use the Reeling skill while you are fishing.</summary>
CanUseReelingOnlyWhileFishing = 1463,
///<summary>The fish has resisted your attempt to bring it in.</summary>
FishResistedAttemptToBringItIn = 1464,
///<summary>Your pumping is successful, causing $s1 damage.</summary>
PumpingSuccesfulS1Damage = 1465,
///<summary>You failed to do anything with the fish and it regains $s1 HP.</summary>
FishResistedPumpingS1HpRegained = 1466,
///<summary>You reel that fish in closer and cause $s1 damage.</summary>
ReelingSuccesfulS1Damage = 1467,
///<summary>You failed to reel that fish in further and it regains $s1 HP.</summary>
FishResistedReelingS1HpRegained = 1468,
///<summary>You caught something!.</summary>
YouCaughtSomething = 1469,
///<summary>You cannot do that while fishing.</summary>
CannotDoWhileFishing2 = 1470,
///<summary>You cannot do that while fishing.</summary>
CannotDoWhileFishing3 = 1471,
///<summary>You look oddly at the fishing pole in disbelief and realize that you can't attack anything with this.</summary>
CannotAttackWithFishingPole = 1472,
///<summary>$s1 is not sufficient.</summary>
S1NotSufficient = 1473,
///<summary>$s1 is not available.</summary>
S1NotAvailable = 1474,
///<summary>Pet has dropped $s1.</summary>
PetDroppedS1 = 1475,
///<summary>Pet has dropped +$s1 $s2.</summary>
PetDroppedS1S2 = 1476,
///<summary>Pet has dropped $s2 of $s1.</summary>
PetDroppedS2S1S = 1477,
///<summary>You may only register a 64 x 64 pixel, 256-color BMP.</summary>
Only64Pixel256ColorBmp = 1478,
///<summary>That is the wrong grade of soulshot for that fishing pole.</summary>
WrongFishingshotGrade = 1479,
///<summary>Are you sure you want to remove yourself from the Grand Olympiad Games waiting list?.</summary>
OlympiadRemoveConfirm = 1480,
///<summary>You have selected a class irrelevant individual match. Do you wish to participate?.</summary>
OlympiadNonClassConfirm = 1481,
///<summary>You've selected to join a class specific game. Continue?.</summary>
OlympiadClassConfirm = 1482,
///<summary>Are you ready to be a Hero?.</summary>
HeroConfirm = 1483,
///<summary>Are you sure this is the Hero weapon you wish to use? Kamael race cannot use this.</summary>
HeroWeaponConfirm = 1484,
///<summary>The ferry from Talking Island to Gludin Harbor has been delayed.</summary>
FerryTalkingGludinDelayed = 1485,
///<summary>The ferry from Gludin Harbor to Talking Island has been delayed.</summary>
FerryGludinTalkingDelayed = 1486,
///<summary>The ferry from Giran Harbor to Talking Island has been delayed.</summary>
FerryGiranTalkingDelayed = 1487,
///<summary>The ferry from Talking Island to Giran Harbor has been delayed.</summary>
FerryTalkingGiranDelayed = 1488,
///<summary>Innadril cruise service has been delayed.</summary>
InnadrilBoatDelayed = 1489,
///<summary>Traded $s2 of crop $s1.</summary>
TradedS2OfCropS1 = 1490,
///<summary>Failed in trading $s2 of crop $s1.</summary>
FailedInTradingS2OfCropS1 = 1491,
///<summary>You will be moved to the Olympiad Stadium in $s1 second(s).</summary>
YouWillEnterTheOlympiadStadiumInS1SecondS = 1492,
///<summary>Your opponent made haste with their tail between their legs, the match has been cancelled.</summary>
TheGameHasBeenCancelledBecauseTheOtherPartyEndsTheGame = 1493,
///<summary>Your opponent does not meet the requirements to do battle, the match has been cancelled.</summary>
TheGameHasBeenCancelledBecauseTheOtherPartyDoesNotMeetTheRequirementsForJoiningTheGame = 1494,
///<summary>The match will start in $s1 second(s).</summary>
TheGameWillStartInS1SecondS = 1495,
///<summary>The match has started, fight!.</summary>
StartsTheGame = 1496,
///<summary>Congratulations, $s1! You win the match!.</summary>
S1HasWonTheGame = 1497,
///<summary>There is no victor, the match ends in a tie.</summary>
TheGameEndedInATie = 1498,
///<summary>You will be moved back to town in $s1 second(s).</summary>
YouWillBeMovedToTownInS1Seconds = 1499,
///<summary>You cannot participate in the Grand Olympiad Games with a character in their subclass.</summary>
YouCantJoinTheOlympiadWithASubJobCharacter = 1500,
///<summary>Only Noblesse can participate in the Olympiad.</summary>
OnlyNoblessCanParticipateInTheOlympiad = 1501,
///<summary>You have already been registered in a waiting list of an event.</summary>
YouHaveAlreadyBeenRegisteredInAWaitingListOfAnEvent = 1502,
///<summary>You have been registered in the Grand Olympiad Games waiting list for a class specific match.</summary>
YouHaveBeenRegisteredInAWaitingListOfClassifiedGames = 1503,
///<summary>You have registered on the waiting list for the non-class-limited individual match event.</summary>
YouHaveBeenRegisteredInAWaitingListOfNoClassGames = 1504,
///<summary>You have been removed from the Grand Olympiad Games waiting list.</summary>
YouHaveBeenDeletedFromTheWaitingListOfAGame = 1505,
///<summary>You are not currently registered on any Grand Olympiad Games waiting list.</summary>
YouHaveNotBeenRegisteredInAWaitingListOfAGame = 1506,
///<summary>You cannot equip that item in a Grand Olympiad Games match.</summary>
ThisItemCantBeEquippedForTheOlympiadEvent = 1507,
///<summary>You cannot use that item in a Grand Olympiad Games match.</summary>
ThisItemIsNotAvailableForTheOlympiadEvent = 1508,
///<summary>You cannot use that skill in a Grand Olympiad Games match.</summary>
ThisSkillIsNotAvailableForTheOlympiadEvent = 1509,
///<summary>$s1 is making an attempt at resurrection. Do you want to continue with this resurrection?.</summary>
RessurectionRequestByS1 = 1510,
///<summary>While a pet is attempting to resurrect, it cannot help in resurrecting its master.</summary>
MasterCannotRes = 1511,
///<summary>You cannot resurrect a pet while their owner is being resurrected.</summary>
CannotResPet = 1512,
///<summary>Resurrection has already been proposed.</summary>
ResHasAlreadyBeenProposed = 1513,
///<summary>You cannot the owner of a pet while their pet is being resurrected.</summary>
CannotResMaster = 1514,
///<summary>A pet cannot be resurrected while it's owner is in the process of resurrecting.</summary>
CannotResPet2 = 1515,
///<summary>The target is unavailable for seeding.</summary>
TheTargetIsUnavailableForSeeding = 1516,
///<summary>Failed in Blessed Enchant. The enchant value of the item became 0.</summary>
BlessedEnchantFailed = 1517,
///<summary>You do not meet the required condition to equip that item.</summary>
CannotEquipItemDueToBadCondition = 1518,
///<summary>Your pet has been killed! Make sure you resurrect your pet within 20 minutes or your pet and all of it's items will disappear forever!.</summary>
MakeSureYouRessurectYourPetWithin20Minutes = 1519,
///<summary>Servitor passed away.</summary>
ServitorPassedAway = 1520,
///<summary>Your servitor has vanished! You'll need to summon a new one.</summary>
YourServitorHasVanished = 1521,
///<summary>Your pet's corpse has decayed!.</summary>
YourPetsCorpseHasDecayed = 1522,
///<summary>You should release your pet or servitor so that it does not fall off of the boat and drown!.</summary>
ReleasePetOnBoat = 1523,
///<summary>$s1's pet gained $s2.</summary>
S1PetGainedS2 = 1524,
///<summary>$s1's pet gained $s3 of $s2.</summary>
S1PetGainedS3S2S = 1525,
///<summary>$s1's pet gained +$s2$s3.</summary>
S1PetGainedS2S3 = 1526,
///<summary>Your pet was hungry so it ate $s1.</summary>
PetTookS1BecauseHeWasHungry = 1527,
///<summary>You've sent a petition to the GM staff.</summary>
SentPetitionToGm = 1528,
///<summary>$s1 is inviting you to the command channel. Do you want accept?.</summary>
CommandChannelConfirmFromS1 = 1529,
///<summary>Select a target or enter the name.</summary>
SelectTargetOrEnterName = 1530,
///<summary>Enter the name of the clan that you wish to declare war on.</summary>
EnterClanNameToDeclareWar2 = 1531,
///<summary>Enter the name of the clan that you wish to have a cease-fire with.</summary>
EnterClanNameToCeaseFire = 1532,
///<summary>Attention: $s1 has picked up $s2.</summary>
AttentionS1PickedUpS2 = 1533,
///<summary>Attention: $s1 has picked up +$s2$s3.</summary>
AttentionS1PickedUpS2S3 = 1534,
///<summary>Attention: $s1's pet has picked up $s2.</summary>
AttentionS1PetPickedUpS2 = 1535,
///<summary>Attention: $s1's pet has picked up +$s2$s3.</summary>
AttentionS1PetPickedUpS2S3 = 1536,
///<summary>Current Location: $s1, $s2, $s3 (near Rune Village).</summary>
LocRuneS1S2S3 = 1537,
///<summary>Current Location: $s1, $s2, $s3 (near the Town of Goddard).</summary>
LocGoddardS1S2S3 = 1538,
///<summary>Cargo has arrived at Talking Island Village.</summary>
CargoAtTalkingVillage = 1539,
///<summary>Cargo has arrived at the Dark Elf Village.</summary>
CargoAtDarkelfVillage = 1540,
///<summary>Cargo has arrived at Elven Village.</summary>
CargoAtElvenVillage = 1541,
///<summary>Cargo has arrived at Orc Village.</summary>
CargoAtOrcVillage = 1542,
///<summary>Cargo has arrived at Dwarfen Village.</summary>
CargoAtDwarvenVillage = 1543,
///<summary>Cargo has arrived at Aden Castle Town.</summary>
CargoAtAden = 1544,
///<summary>Cargo has arrived at Town of Oren.</summary>
CargoAtOren = 1545,
///<summary>Cargo has arrived at Hunters Village.</summary>
CargoAtHunters = 1546,
///<summary>Cargo has arrived at the Town of Dion.</summary>
CargoAtDion = 1547,
///<summary>Cargo has arrived at Floran Village.</summary>
CargoAtFloran = 1548,
///<summary>Cargo has arrived at Gludin Village.</summary>
CargoAtGludin = 1549,
///<summary>Cargo has arrived at the Town of Gludio.</summary>
CargoAtGludio = 1550,
///<summary>Cargo has arrived at Giran Castle Town.</summary>
CargoAtGiran = 1551,
///<summary>Cargo has arrived at Heine.</summary>
CargoAtHeine = 1552,
///<summary>Cargo has arrived at Rune Village.</summary>
CargoAtRune = 1553,
///<summary>Cargo has arrived at the Town of Goddard.</summary>
CargoAtGoddard = 1554,
///<summary>Do you want to cancel character deletion?.</summary>
CancelCharacterDeletionConfirm = 1555,
///<summary>Your clan notice has been saved.</summary>
ClanNoticeSaved = 1556,
///<summary>Seed price should be more than $s1 and less than $s2.</summary>
SeedPriceShouldBeMoreThanS1AndLessThanS2 = 1557,
///<summary>The quantity of seed should be more than $s1 and less than $s2.</summary>
TheQuantityOfSeedShouldBeMoreThanS1AndLessThanS2 = 1558,
///<summary>Crop price should be more than $s1 and less than $s2.</summary>
CropPriceShouldBeMoreThanS1AndLessThanS2 = 1559,
///<summary>The quantity of crop should be more than $s1 and less than $s2.</summary>
TheQuantityOfCropShouldBeMoreThanS1AndLessThanS2 = 1560,
///<summary>The clan, $s1, has declared a Clan War.</summary>
ClanS1DeclaredWar = 1561,
///<summary>A Clan War has been declared against the clan, $s1. you will only lose a quarter of the normal experience from death.</summary>
ClanWarDeclaredAgainstS1IfKilledLoseLowExp = 1562,
///<summary>The clan, $s1, cannot declare a Clan War because their clan is less than level three, and or they do not have enough members.</summary>
S1ClanCannotDeclareWarTooLowLevelOrNotEnoughMembers = 1563,
///<summary>A Clan War can be declared only if the clan is level three or above, and the number of clan members is fifteen or greater.</summary>
ClanWarDeclaredIfClanLvl3Or15Member = 1564,
///<summary>A Clan War cannot be declared against a clan that does not exist!.</summary>
ClanWarCannotDeclaredClanNotExist = 1565,
///<summary>The clan, $s1, has decided to stop the war.</summary>
ClanS1HasDecidedToStop = 1566,
///<summary>The war against $s1 Clan has been stopped.</summary>
WarAgainstS1HasStopped = 1567,
///<summary>The target for declaration is wrong.</summary>
WrongDeclarationTarget = 1568,
///<summary>A declaration of Clan War against an allied clan can't be made.</summary>
ClanWarAgainstAAlliedClanNotWork = 1569,
///<summary>A declaration of war against more than 30 Clans can't be made at the same time.</summary>
TooManyClanWars = 1570,
///<summary>======Clans You've Declared War On======.</summary>
ClansYouDeclaredWarOn = 1571,
///<summary>======Clans That Have Declared War On You======.</summary>
ClansThatHaveDeclaredWarOnYou = 1572,
///<summary>There are no clans that your clan has declared war against.</summary>
YouArentInClanWars = 1573,
///<summary>All is well. There are no clans that have declared war against your clan.</summary>
NoClanWarsVsYou = 1574,
///<summary>Command Channels can only be formed by a party leader who is also the leader of a level 5 clan.</summary>
CommandChannelOnlyByLevel5ClanLeaderPartyLeader = 1575,
///<summary>Pet uses the power of spirit.</summary>
PetUseThePowerOfSpirit = 1576,
///<summary>Servitor uses the power of spirit.</summary>
ServitorUseThePowerOfSpirit = 1577,
///<summary>Items are not available for a private store or a private manufacture.</summary>
ItemsUnavailableForStoreManufacture = 1578,
///<summary>$s1's pet gained $s2 adena.</summary>
S1PetGainedS2Adena = 1579,
///<summary>The Command Channel has been formed.</summary>
CommandChannelFormed = 1580,
///<summary>The Command Channel has been disbanded.</summary>
CommandChannelDisbanded = 1581,
///<summary>You have joined the Command Channel.</summary>
JoinedCommandChannel = 1582,
///<summary>You were dismissed from the Command Channel.</summary>
DismissedFromCommandChannel = 1583,
///<summary>$s1's party has been dismissed from the Command Channel.</summary>
S1PartyDismissedFromCommandChannel = 1584,
///<summary>The Command Channel has been disbanded.</summary>
CommandChannelDisbanded2 = 1585,
///<summary>You have quit the Command Channel.</summary>
LeftCommandChannel = 1586,
///<summary>$s1's party has left the Command Channel.</summary>
S1PartyLeftCommandChannel = 1587,
///<summary>The Command Channel is activated only when there are at least 5 parties participating.</summary>
CommandChannelOnlyAtLeast5Parties = 1588,
///<summary>Command Channel authority has been transferred to $s1.</summary>
CommandChannelLeaderNowS1 = 1589,
///<summary>===Guild Info (Total Parties: $s1)===.</summary>
GuildInfoHeader = 1590,
///<summary>No user has been invited to the Command Channel.</summary>
NoUserInvitedToCommandChannel = 1591,
///<summary>You can no longer set up a Command Channel.</summary>
CannotLongerSetupCommandChannel = 1592,
///<summary>You do not have authority to invite someone to the Command Channel.</summary>
CannotInviteToCommandChannel = 1593,
///<summary>$s1's party is already a member of the Command Channel.</summary>
S1AlreadyMemberOfCommandChannel = 1594,
///<summary>$s1 has succeeded.</summary>
S1Succeeded = 1595,
///<summary>You were hit by $s1!.</summary>
HitByS1 = 1596,
///<summary>$s1 has failed.</summary>
S1Failed = 1597,
///<summary>Soulshots and spiritshots are not available for a dead pet or servitor. Sad, isn't it?.</summary>
SoulshotsAndSpiritshotsAreNotAvailableForADeadPet = 1598,
///<summary>You cannot observe while you are in combat!.</summary>
CannotObserveInCombat = 1599,
///<summary>Tomorrow's items will ALL be set to 0. Do you wish to continue?.</summary>
TomorrowItemZeroConfirm = 1600,
///<summary>Tomorrow's items will all be set to the same value as today's items. Do you wish to continue?.</summary>
TomorrowItemSameConfirm = 1601,
///<summary>Only a party leader can access the Command Channel.</summary>
CommandChannelOnlyForPartyLeader = 1602,
///<summary>Only channel operator can give All Command.</summary>
OnlyCommanderGiveCommand = 1603,
///<summary>While dressed in formal wear, you can't use items that require all skills and casting operations.</summary>
CannotUseItemsSkillsWithFormalwear = 1604,
///<summary>* Here, you can buy only seeds of $s1 Manor.</summary>
HereYouCanBuyOnlySeedsOfS1Manor = 1605,
///<summary>Congratulations - You've completed the third-class transfer quest!.</summary>
ThirdClassTransfer = 1606,
///<summary>$s1 adena has been withdrawn to pay for purchasing fees.</summary>
S1AdenaHasBeenWithdrawnToPayForPurchasingFees = 1607,
///<summary>Due to insufficient adena you cannot buy another castle.</summary>
InsufficientAdenaToBuyCastle = 1608,
///<summary>War has already been declared against that clan... but I'll make note that you really don't like them.</summary>
WarAlreadyDeclared = 1609,
///<summary>Fool! You cannot declare war against your own clan!.</summary>
CannotDeclareAgainstOwnClan = 1610,
///<summary>Leader: $s1.</summary>
PartyLeaderS1 = 1611,
///<summary>=====War List=====.</summary>
WarList = 1612,
///<summary>There is no clan listed on War List.</summary>
NoClanOnWarList = 1613,
///<summary>You have joined a channel that was already open.</summary>
JoinedChannelAlreadyOpen = 1614,
///<summary>The number of remaining parties is $s1 until a channel is activated.</summary>
S1PartiesRemainingUntilChannel = 1615,
///<summary>The Command Channel has been activated.</summary>
CommandChannelActivated = 1616,
///<summary>You do not have the authority to use the Command Channel.</summary>
CantUseCommandChannel = 1617,
///<summary>The ferry from Rune Harbor to Gludin Harbor has been delayed.</summary>
FerryRuneGludinDelayed = 1618,
///<summary>The ferry from Gludin Harbor to Rune Harbor has been delayed.</summary>
FerryGludinRuneDelayed = 1619,
///<summary>Arrived at Rune Harbor.</summary>
ArrivedAtRune = 1620,
///<summary>Departure for Gludin Harbor will take place in five minutes!.</summary>
DepartureForGludin5Minutes = 1621,
///<summary>Departure for Gludin Harbor will take place in one minute!.</summary>
DepartureForGludin1Minute = 1622,
///<summary>Make haste! We will be departing for Gludin Harbor shortly.</summary>
DepartureForGludinShortly = 1623,
///<summary>We are now departing for Gludin Harbor Hold on and enjoy the ride!.</summary>
DepartureForGludinNow = 1624,
///<summary>Departure for Rune Harbor will take place after anchoring for ten minutes.</summary>
DepartureForRune10Minutes = 1625,
///<summary>Departure for Rune Harbor will take place in five minutes!.</summary>
DepartureForRune5Minutes = 1626,
///<summary>Departure for Rune Harbor will take place in one minute!.</summary>
DepartureForRune1Minute = 1627,
///<summary>Make haste! We will be departing for Gludin Harbor shortly.</summary>
DepartureForGludinShortly2 = 1628,
///<summary>We are now departing for Rune Harbor Hold on and enjoy the ride!.</summary>
DepartureForRuneNow = 1629,
///<summary>The ferry from Rune Harbor will be arriving at Gludin Harbor in approximately 15 minutes.</summary>
FerryFromRuneAtGludin15Minutes = 1630,
///<summary>The ferry from Rune Harbor will be arriving at Gludin Harbor in approximately 10 minutes.</summary>
FerryFromRuneAtGludin10Minutes = 1631,
///<summary>The ferry from Rune Harbor will be arriving at Gludin Harbor in approximately 10 minutes.</summary>
FerryFromRuneAtGludin5Minutes = 1632,
///<summary>The ferry from Rune Harbor will be arriving at Gludin Harbor in approximately 1 minute.</summary>
FerryFromRuneAtGludin1Minute = 1633,
///<summary>The ferry from Gludin Harbor will be arriving at Rune Harbor in approximately 15 minutes.</summary>
FerryFromGludinAtRune15Minutes = 1634,
///<summary>The ferry from Gludin Harbor will be arriving at Rune harbor in approximately 10 minutes.</summary>
FerryFromGludinAtRune10Minutes = 1635,
///<summary>The ferry from Gludin Harbor will be arriving at Rune Harbor in approximately 10 minutes.</summary>
FerryFromGludinAtRune5Minutes = 1636,
///<summary>The ferry from Gludin Harbor will be arriving at Rune Harbor in approximately 1 minute.</summary>
FerryFromGludinAtRune1Minute = 1637,
///<summary>You cannot fish while using a recipe book, private manufacture or private store.</summary>
CannotFishWhileUsingRecipeBook = 1638,
///<summary>Period $s1 of the Grand Olympiad Games has started!.</summary>
OlympiadPeriodS1HasStarted = 1639,
///<summary>Period $s1 of the Grand Olympiad Games has now ended.</summary>
OlympiadPeriodS1HasEnded = 1640,
///<summary>and make haste to a Grand Olympiad Manager! Battles in the Grand Olympiad Games are now taking place!.</summary>
TheOlympiadGameHasStarted = 1641,
///<summary>Much carnage has been left for the cleanup crew of the Olympiad Stadium. Battles in the Grand Olympiad Games are now over!.</summary>
TheOlympiadGameHasEnded = 1642,
///<summary>Current Location: $s1, $s2, $s3 (Dimensional Gap).</summary>
LocDimensionalGapS1S2S3 = 1643,
///<summary>Play time is now accumulating.</summary>
PlayTimeNowAccumulating = 1649,
///<summary>Due to high server traffic, your login attempt has failed. Please try again soon.</summary>
TryLoginLater = 1650,
///<summary>The Grand Olympiad Games are not currently in progress.</summary>
TheOlympiadGameIsNotCurrentlyInProgress = 1651,
///<summary>You are now recording gameplay.</summary>
RecordingGameplayStart = 1652,
///<summary>Your recording has been successfully stored. ($s1).</summary>
RecordingGameplayStopS1 = 1653,
///<summary>Your attempt to record the replay file has failed.</summary>
RecordingGameplayFailed = 1654,
///<summary>You caught something smelly and scary, maybe you should throw it back!?.</summary>
YouCaughtSomethingSmellyThrowItBack = 1655,
///<summary>You have successfully traded the item with the NPC.</summary>
SuccessfullyTradedWithNpc = 1656,
///<summary>$s1 has earned $s2 points in the Grand Olympiad Games.</summary>
S1HasGainedS2OlympiadPoints = 1657,
///<summary>$s1 has lost $s2 points in the Grand Olympiad Games.</summary>
S1HasLostS2OlympiadPoints = 1658,
///<summary>Current Location: $s1, $s2, $s3 (Cemetery of the Empire).</summary>
LocCemetaryOfTheEmpireS1S2S3 = 1659,
///<summary>Channel Creator: $s1.</summary>
ChannelCreatorS1 = 1660,
///<summary>$s1 has obtained $s3 $s2s.</summary>
S1ObtainedS3S2S = 1661,
///<summary>The fish are no longer biting here because you've caught too many! Try fishing in another location.</summary>
FishNoMoreBitingTryOtherLocation = 1662,
///<summary>The clan crest was successfully registered. Remember, only a clan that owns a clan hall or castle can have their crest displayed.</summary>
ClanEmblemWasSuccessfullyRegistered = 1663,
///<summary>The fish is resisting your efforts to haul it in! Look at that bobber go!.</summary>
FishResistingLookBobbler = 1664,
///<summary>You've worn that fish out! It can't even pull the bobber under the water!.</summary>
YouWornFishOut = 1665,
///<summary>You have obtained +$s1 $s2.</summary>
ObtainedS1S2 = 1666,
///<summary>Lethal Strike!.</summary>
LethalStrike = 1667,
///<summary>Your lethal strike was successful!.</summary>
LethalStrikeSuccessful = 1668,
///<summary>There was nothing found inside of that.</summary>
NothingInsideThat = 1669,
///<summary>Due to your Reeling and/or Pumping skill being three or more levels higher than your Fishing skill, a 50 damage penalty will be applied.</summary>
ReelingPumping3LevelsHigherThanFishingPenalty = 1670,
///<summary>Your reeling was successful! (Mastery Penalty:$s1 ).</summary>
ReelingSuccessfulPenaltyS1 = 1671,
///<summary>Your pumping was successful! (Mastery Penalty:$s1 ).</summary>
PumpingSuccessfulPenaltyS1 = 1672,
///<summary>Your current record for this Grand Olympiad is $s1 match(es), $s2 win(s) and $s3 defeat(s). You have earned $s4 Olympiad Point(s).</summary>
TheCurrentRecordForThisOlympiadSessionIsS1MatchesS2WinsS3DefeatsYouHaveEarnedS4OlympiadPoints = 1673,
///<summary>This command can only be used by a Noblesse.</summary>
NoblesseOnly = 1674,
///<summary>A manor cannot be set up between 6 a.m. and 8 p.m.</summary>
AManorCannotBeSetUpBetween6AmAnd8Pm = 1675,
///<summary>You do not have a servitor or pet and therefore cannot use the automatic-use function.</summary>
NoServitorCannotAutomateUse = 1676,
///<summary>A cease-fire during a Clan War can not be called while members of your clan are engaged in battle.</summary>
CantStopClanWarWhileInCombat = 1677,
///<summary>You have not declared a Clan War against the clan $s1.</summary>
NoClanWarAgainstClanS1 = 1678,
///<summary>Only the creator of a channel can issue a global command.</summary>
OnlyChannelCreatorCanGlobalCommand = 1679,
///<summary>$s1 has declined the channel invitation.</summary>
S1DeclinedChannelInvitation = 1680,
///<summary>Since $s1 did not respond, your channel invitation has failed.</summary>
S1DidNotRespondChannelInvitationFailed = 1681,
///<summary>Only the creator of a channel can use the channel dismiss command.</summary>
OnlyChannelCreatorCanDismiss = 1682,
///<summary>Only a party leader can choose the option to leave a channel.</summary>
OnlyPartyLeaderCanLeaveChannel = 1683,
///<summary>A Clan War can not be declared against a clan that is being dissolved.</summary>
NoClanWarAgainstDissolvingClan = 1684,
///<summary>You are unable to equip this item when your PK count is greater or equal to one.</summary>
YouAreUnableToEquipThisItemWhenYourPkCountIsGreaterThanOrEqualToOne = 1685,
///<summary>Stones and mortar tumble to the earth - the castle wall has taken damage!.</summary>
CastleWallDamaged = 1686,
///<summary>This area cannot be entered while mounted atop of a Wyvern. You will be dismounted from your Wyvern if you do not leave!.</summary>
AreaCannotBeEnteredWhileMountedWyvern = 1687,
///<summary>You cannot enchant while operating a Private Store or Private Workshop.</summary>
CannotEnchantWhileStore = 1688,
///<summary>You have already joined the waiting list for a class specific match.</summary>
YouAreAlreadyOnTheWaitingListToParticipateInTheGameForYourClass = 1689,
///<summary>You have already joined the waiting list for a non-class specific match.</summary>
YouAreAlreadyOnTheWaitingListForAllClassesWaitingToParticipateInTheGame = 1690,
///<summary>You can't join a Grand Olympiad Game match with that much stuff on you! Reduce your weight to below 80 percent full and request to join again!.</summary>
Since80PercentOrMoreOfYourInventorySlotsAreFullYouCannotParticipateInTheOlympiad = 1691,
///<summary>You have changed from your main class to a subclass and therefore are removed from the Grand Olympiad Games waiting list.</summary>
SinceYouHaveChangedYourClassIntoASubJobYouCannotParticipateInTheOlympiad = 1692,
///<summary>You may not observe a Grand Olympiad Games match while you are on the waiting list.</summary>
WhileYouAreOnTheWaitingListYouAreNotAllowedToWatchTheGame = 1693,
///<summary>Only a clan leader that is a Noblesse can view the Siege War Status window during a siege war.</summary>
OnlyNoblesseLeaderCanViewSiegeStatusWindow = 1694,
///<summary>You can only use that during a Siege War!.</summary>
OnlyDuringSiege = 1695,
///<summary>Your accumulated play time is $s1.</summary>
AccumulatedPlayTimeIsS1 = 1696,
///<summary>Your accumulated play time has reached Fatigue level, so you will receive experience or item drops at only 50 percent [...].</summary>
AccumulatedPlayTimeWarning1 = 1697,
///<summary>Your accumulated play time has reached Ill-health level, so you will no longer gain experience or item drops. [...}.</summary>
AccumulatedPlayTimeWarning2 = 1698,
///<summary>You cannot dismiss a party member by force.</summary>
CannotDismissPartyMember = 1699,
///<summary>You don't have enough spiritshots needed for a pet/servitor.</summary>
NotEnoughSpiritshotsForPet = 1700,
///<summary>You don't have enough soulshots needed for a pet/servitor.</summary>
NotEnoughSoulshotsForPet = 1701,
///<summary>$s1 is using a third party program.</summary>
S1UsingThirdPartyProgram = 1702,
///<summary>The previous investigated user is not using a third party program.</summary>
NotUsingThirdPartyProgram = 1703,
///<summary>Please close the setup window for your private manufacturing store or private store, and try again.</summary>
CloseStoreWindowAndTryAgain = 1704,
///<summary>PC Bang Points acquisition period. Points acquisition period left $s1 hour.</summary>
PcpointAcquisitionPeriod = 1705,
///<summary>PC Bang Points use period. Points acquisition period left $s1 hour.</summary>
PcpointUsePeriod = 1706,
///<summary>You acquired $s1 PC Bang Point.</summary>
AcquiredS1Pcpoint = 1707,
///<summary>Double points! You acquired $s1 PC Bang Point.</summary>
AcquiredS1PcpointDouble = 1708,
///<summary>You are using $s1 point.</summary>
UsingS1Pcpoint = 1709,
///<summary>You are short of accumulated points.</summary>
ShortOfAccumulatedPoints = 1710,
///<summary>PC Bang Points use period has expired.</summary>
PcpointUsePeriodExpired = 1711,
///<summary>The PC Bang Points accumulation period has expired.</summary>
PcpointAccumulationPeriodExpired = 1712,
///<summary>The games may be delayed due to an insufficient number of players waiting.</summary>
GamesDelayed = 1713,
///<summary>Current Location: $s1, $s2, $s3 (Near the Town of Schuttgart).</summary>
LocSchuttgartS1S2S3 = 1714,
///<summary>This is a Peaceful Zone.</summary>
PeacefulZone = 1715,
///<summary>Altered Zone.</summary>
AlteredZone = 1716,
///<summary>Siege War Zone.</summary>
SiegeZone = 1717,
///<summary>General Field.</summary>
GeneralZone = 1718,
///<summary>Seven Signs Zone.</summary>
SevensignsZone = 1719,
///<summary>---.</summary>
Unknown1 = 1720,
///<summary>Combat Zone.</summary>
CombatZone = 1721,
///<summary>Please enter the name of the item you wish to search for.</summary>
EnterItemNameSearch = 1722,
///<summary>Please take a moment to provide feedback about the petition service.</summary>
PleaseProvidePetitionFeedback = 1723,
///<summary>A servitor whom is engaged in battle cannot be de-activated.</summary>
ServitorNotReturnInBattle = 1724,
///<summary>You have earned $s1 raid point(s).</summary>
EarnedS1RaidPoints = 1725,
///<summary>$s1 has disappeared because its time period has expired.</summary>
S1PeriodExpiredDisappeared = 1726,
///<summary>$s1 has invited you to a party room. Do you accept?.</summary>
S1InvitedYouToPartyRoomConfirm = 1727,
///<summary>The recipient of your invitation did not accept the party matching invitation.</summary>
PartyMatchingRequestNoResponse = 1728,
///<summary>You cannot join a Command Channel while teleporting.</summary>
NotJoinChannelWhileTeleporting = 1729,
///<summary>To establish a Clan Academy, your clan must be Level 5 or higher.</summary>
YouDoNotMeetCriteriaInOrderToCreateAClanAcademy = 1730,
///<summary>Only the leader can create a Clan Academy.</summary>
OnlyLeaderCanCreateAcademy = 1731,
///<summary>To create a Clan Academy, a Blood Mark is needed.</summary>
NeedBloodmarkForAcademy = 1732,
///<summary>You do not have enough adena to create a Clan Academy.</summary>
NeedAdenaForAcademy = 1733,
///<summary>not belong another clan and not yet completed their 2nd class transfer.</summary>
AcademyRequirements = 1734,
///<summary>$s1 does not meet the requirements to join a Clan Academy.</summary>
S1DoesnotMeetRequirementsToJoinAcademy = 1735,
///<summary>The Clan Academy has reached its maximum enrollment.</summary>
AcademyMaximum = 1736,
///<summary>Your clan has not established a Clan Academy but is eligible to do so.</summary>
ClanCanCreateAcademy = 1737,
///<summary>Your clan has already established a Clan Academy.</summary>
ClanHasAlreadyEstablishedAClanAcademy = 1738,
///<summary>Would you like to create a Clan Academy?.</summary>
ClanAcademyCreateConfirm = 1739,
///<summary>Please enter the name of the Clan Academy.</summary>
AcademyCreateEnterName = 1740,
///<summary>Congratulations! The $s1's Clan Academy has been created.</summary>
TheS1SClanAcademyHasBeenCreated = 1741,
///<summary>A message inviting $s1 to join the Clan Academy is being sent.</summary>
AcademyInvitationSentToS1 = 1742,
///<summary>To open a Clan Academy, the leader of a Level 5 clan or above must pay XX Proofs of Blood or a certain amount of adena.</summary>
OpenAcademyConditions = 1743,
///<summary>There was no response to your invitation to join the Clan Academy, so the invitation has been rescinded.</summary>
AcademyJoinNoResponse = 1744,
///<summary>The recipient of your invitation to join the Clan Academy has declined.</summary>
AcademyJoinDecline = 1745,
///<summary>You have already joined a Clan Academy.</summary>
AlreadyJoinedAcademy = 1746,
///<summary>$s1 has sent you an invitation to join the Clan Academy belonging to the $s2 clan. Do you accept?.</summary>
JoinAcademyRequestByS1ForClanS2 = 1747,
///<summary>Clan Academy member $s1 has successfully completed the 2nd class transfer and obtained $s2 Clan Reputation points.</summary>
ClanMemberGraduatedFromAcademy = 1748,
///<summary>Congratulations! You will now graduate from the Clan Academy and leave your current clan. As a graduate of the academy, you can immediately join a clan as a regular member without being subject to any penalties.</summary>
AcademyMembershipTerminated = 1749,
///<summary>If you possess $s1, you cannot participate in the Olympiad.</summary>
CannotJoinOlympiadPossessingS1 = 1750,
///<summary>The Grand Master has given you a commemorative item.</summary>
GrandMasterCommemorativeItem = 1751,
///<summary>Since the clan has received a graduate of the Clan Academy, it has earned $s1 points towards its reputation score.</summary>
MemberGraduatedEarnedS1Repu = 1752,
///<summary>The clan leader has decreed that that particular privilege cannot be granted to a Clan Academy member.</summary>
CantTransferPrivilegeToAcademyMember = 1753,
///<summary>That privilege cannot be granted to a Clan Academy member.</summary>
RightCantTransferredToAcademyMember = 1754,
///<summary>$s2 has been designated as the apprentice of clan member $s1.</summary>
S2HasBeenDesignatedAsApprenticeOfClanMemberS1 = 1755,
///<summary>Your apprentice, $s1, has logged in.</summary>
YourApprenticeS1HasLoggedIn = 1756,
///<summary>Your apprentice, $s1, has logged out.</summary>
YourApprenticeS1HasLoggedOut = 1757,
///<summary>Your sponsor, $s1, has logged in.</summary>
YourSponsorS1HasLoggedIn = 1758,
///<summary>Your sponsor, $s1, has logged out.</summary>
YourSponsorS1HasLoggedOut = 1759,
///<summary>Clan member $s1's name title has been changed to $2.</summary>
ClanMemberS1TitleChangedToS2 = 1760,
///<summary>Clan member $s1's privilege level has been changed to $s2.</summary>
ClanMemberS1PrivilegeChangedToS2 = 1761,
///<summary>You do not have the right to dismiss an apprentice.</summary>
YouDoNotHaveTheRightToDismissAnApprentice = 1762,
///<summary>$s2, clan member $s1's apprentice, has been removed.</summary>
S2ClanMemberS1ApprenticeHasBeenRemoved = 1763,
///<summary>This item can only be worn by a member of the Clan Academy.</summary>
EquipOnlyForAcademy = 1764,
///<summary>As a graduate of the Clan Academy, you can no longer wear this item.</summary>
EquipNotForGraduates = 1765,
///<summary>An application to join the clan has been sent to $s1 in $s2.</summary>
ClanJoinApplicationSentToS1InS2 = 1766,
///<summary>An application to join the clan Academy has been sent to $s1.</summary>
AcademyJoinApplicationSentToS1 = 1767,
///<summary>$s1 has invited you to join the Clan Academy of $s2 clan. Would you like to join?.</summary>
JoinRequestByS1ToClanS2Academy = 1768,
///<summary>$s1 has sent you an invitation to join the $s3 Order of Knights under the $s2 clan. Would you like to join?.</summary>
JoinRequestByS1ToOrderOfKnightsS3UnderClanS2 = 1769,
///<summary>The clan's reputation score has dropped below 0. The clan may face certain penalties as a result.</summary>
ClanRepu0MayFacePenalties = 1770,
///<summary>Now that your clan level is above Level 5, it can accumulate clan reputation points.</summary>
ClanCanAccumulateClanReputationPoints = 1771,
///<summary>Since your clan was defeated in a siege, $s1 points have been deducted from your clan's reputation score and given to the opposing clan.</summary>
ClanWasDefeatedInSiegeAndLostS1ReputationPoints = 1772,
///<summary>Since your clan emerged victorious from the siege, $s1 points have been added to your clan's reputation score.</summary>
ClanVictoriousInSiegeAndGainedS1ReputationPoints = 1773,
///<summary>Your clan's newly acquired contested clan hall has added $s1 points to your clan's reputation score.</summary>
ClanAcquiredContestedClanHallAndS1ReputationPoints = 1774,
///<summary>Clan member $s1 was an active member of the highest-ranked party in the Festival of Darkness. $s2 points have been added to your clan's reputation score.</summary>
ClanMemberS1WasInHighestRankedPartyInFestivalOfDarknessAndGainedS2Reputation = 1775,
///<summary>Clan member $s1 was named a hero. $2s points have been added to your clan's reputation score.</summary>
ClanMemberS1BecameHeroAndGainedS2ReputationPoints = 1776,
///<summary>You have successfully completed a clan quest. $s1 points have been added to your clan's reputation score.</summary>
ClanQuestCompletedAndS1PointsGained = 1777,
///<summary>An opposing clan has captured your clan's contested clan hall. $s1 points have been deducted from your clan's reputation score.</summary>
OpposingClanCapturedClanHallAndYourClanLosesS1Points = 1778,
///<summary>After losing the contested clan hall, 300 points have been deducted from your clan's reputation score.</summary>
ClanLostContestedClanHallAnd300Points = 1779,
///<summary>Your clan has captured your opponent's contested clan hall. $s1 points have been deducted from your opponent's clan reputation score.</summary>
ClanCapturedContestedClanHallAndS1PointsDeductedFromOpponent = 1780,
///<summary>Your clan has added $1s points to its clan reputation score.</summary>
ClanAddedS1SPointsToReputationScore = 1781,
///<summary>Your clan member $s1 was killed. $s2 points have been deducted from your clan's reputation score and added to your opponent's clan reputation score.</summary>
ClanMemberS1WasKilledAndS2PointsDeductedFromReputation = 1782,
///<summary>For killing an opposing clan member, $s1 points have been deducted from your opponents' clan reputation score.</summary>
ForKillingOpposingMemberS1PointsWereDeductedFromOpponents = 1783,
///<summary>Your clan has failed to defend the castle. $s1 points have been deducted from your clan's reputation score and added to your opponents'.</summary>
YourClanFailedToDefendCastleAndS1PointsLostAndAddedToOpponent = 1784,
///<summary>The clan you belong to has been initialized. $s1 points have been deducted from your clan reputation score.</summary>
YourClanHasBeenInitializedAndS1PointsLost = 1785,
///<summary>Your clan has failed to defend the castle. $s1 points have been deducted from your clan's reputation score.</summary>
YourClanFailedToDefendCastleAndS1PointsLost = 1786,
///<summary>$s1 points have been deducted from the clan's reputation score.</summary>
S1DeductedFromClanRep = 1787,
///<summary>The clan skill $s1 has been added.</summary>
ClanSkillS1Added = 1788,
///<summary>Since the Clan Reputation Score has dropped to 0 or lower, your clan skill(s) will be de-activated.</summary>
ReputationPoints0OrLowerClanSkillsDeactivated = 1789,
///<summary>The conditions necessary to increase the clan's level have not been met.</summary>
FailedToIncreaseClanLevel = 1790,
///<summary>The conditions necessary to create a military unit have not been met.</summary>
YouDoNotMeetCriteriaInOrderToCreateAMilitaryUnit = 1791,
///<summary>Please assign a manager for your new Order of Knights.</summary>
AssignManagerForOrderOfKnights = 1792,
///<summary>$s1 has been selected as the captain of $s2.</summary>
S1HasBeenSelectedAsCaptainOfS2 = 1793,
///<summary>The Knights of $s1 have been created.</summary>
TheKnightsOfS1HaveBeenCreated = 1794,
///<summary>The Royal Guard of $s1 have been created.</summary>
TheRoyalGuardOfS1HaveBeenCreated = 1795,
///<summary>Your account has been suspended .</summary>
IllegalUse17 = 1796,
///<summary>$s1 has been promoted to $s2.</summary>
S1PromotedToS2 = 1797,
///<summary>Clan lord privileges have been transferred to $s1.</summary>
ClanLeaderPrivilegesHaveBeenTransferredToS1 = 1798,
///<summary>We are searching for BOT users. Please try again later.</summary>
SearchingForBotUsersTryAgainLater = 1799,
///<summary>User $s1 has a history of using BOT.</summary>
S1HistoryUsingBot = 1800,
///<summary>The attempt to sell has failed.</summary>
SellAttemptFailed = 1801,
///<summary>The attempt to trade has failed.</summary>
TradeAttemptFailed = 1802,
///<summary>The request to participate in the game cannot be made starting from 10 minutes before the end of the game.</summary>
GameRequestCannotBeMade = 1803,
///<summary>Your account has been suspended .</summary>
IllegalUse18 = 1804,
///<summary>Your account has been suspended .</summary>
IllegalUse19 = 1805,
///<summary>Your account has been suspended .</summary>
IllegalUse20 = 1806,
///<summary>Your account has been suspended .</summary>
IllegalUse21 = 1807,
///<summary>Your account has been suspended .</summary>
IllegalUse22 = 1808,
///<summary>please visit the PlayNC website (http://www.plaync.com/us/support/).</summary>
AccountMustVerified = 1809,
///<summary>The refuse invitation state has been activated.</summary>
RefuseInvitationActivated = 1810,
///<summary>Since the refuse invitation state is currently activated, no invitation can be made.</summary>
RefuseInvitationCurrentlyActive = 1812,
///<summary>$s1 has $s2 hour(s) of usage time remaining.</summary>
S2HourOfUsageTimeAreLeftForS1 = 1813,
///<summary>$s1 has $s2 minute(s) of usage time remaining.</summary>
S2MinuteOfUsageTimeAreLeftForS1 = 1814,
///<summary>$s2 was dropped in the $s1 region.</summary>
S2WasDroppedInTheS1Region = 1815,
///<summary>The owner of $s2 has appeared in the $s1 region.</summary>
TheOwnerOfS2HasAppearedInTheS1Region = 1816,
///<summary>$s2's owner has logged into the $s1 region.</summary>
S2OwnerHasLoggedIntoTheS1Region = 1817,
///<summary>$s1 has disappeared.</summary>
S1HasDisappeared = 1818,
///<summary>An evil is pulsating from $s2 in $s1.</summary>
EvilFromS2InS1 = 1819,
///<summary>$s1 is currently asleep.</summary>
S1CurrentlySleep = 1820,
///<summary>$s2's evil presence is felt in $s1.</summary>
S2EvilPresenceFeltInS1 = 1821,
///<summary>$s1 has been sealed.</summary>
S1Sealed = 1822,
///<summary>The registration period for a clan hall war has ended.</summary>
ClanhallWarRegistrationPeriodEnded = 1823,
///<summary>You have been registered for a clan hall war. Please move to the left side of the clan hall's arena and get ready.</summary>
RegisteredForClanhallWar = 1824,
///<summary>You have failed in your attempt to register for the clan hall war. Please try again.</summary>
ClanhallWarRegistrationFailed = 1825,
///<summary>In $s1 minute(s), the game will begin. All players must hurry and move to the left side of the clan hall's arena.</summary>
ClanhallWarBeginsInS1Minutes = 1826,
///<summary>In $s1 minute(s), the game will begin. All players must, please enter the arena now.</summary>
ClanhallWarBeginsInS1MinutesEnterNow = 1827,
///<summary>In $s1 seconds(s), the game will begin.</summary>
ClanhallWarBeginsInS1Seconds = 1828,
///<summary>The Command Channel is full.</summary>
CommandChannelFull = 1829,
///<summary>$s1 is not allowed to use the party room invite command. Please update the waiting list.</summary>
S1NotAllowedInviteToPartyRoom = 1830,
///<summary>$s1 does not meet the conditions of the party room. Please update the waiting list.</summary>
S1NotMeetConditionsForPartyRoom = 1831,
///<summary>Only a room leader may invite others to a party room.</summary>
OnlyRoomLeaderCanInvite = 1832,
///<summary>All of $s1 will be dropped. Would you like to continue?.</summary>
ConfirmDropAllOfS1 = 1833,
///<summary>The party room is full. No more characters can be invitet in.</summary>
PartyRoomFull = 1834,
///<summary>$s1 is full and cannot accept additional clan members at this time.</summary>
S1ClanIsFull = 1835,
///<summary>You cannot join a Clan Academy because you have successfully completed your 2nd class transfer.</summary>
CannotJoinAcademyAfter_2NdOccupation = 1836,
///<summary>$s1 has sent you an invitation to join the $s3 Royal Guard under the $s2 clan. Would you like to join?.</summary>
S1SentInvitationToRoyalGuardS3OfClanS2 = 1837,
///<summary>1. The coupon an be used once per character.</summary>
CouponOncePerCharacter = 1838,
///<summary>2. A used serial number may not be used again.</summary>
SerialMayUsedOnce = 1839,
///<summary>3. If you enter the incorrect serial number more than 5 times, .</summary>
SerialInputIncorrect = 1840,
///<summary>The clan hall war has been cancelled. Not enough clans have registered.</summary>
ClanhallWarCancelled = 1841,
///<summary>$s1 wishes to summon you from $s2. Do you accept?.</summary>
S1WishesToSummonYouFromS2DoYouAccept = 1842,
///<summary>$s1 is engaged in combat and cannot be summoned.</summary>
S1IsEngagedInCombatAndCannotBeSummoned = 1843,
///<summary>$s1 is dead at the moment and cannot be summoned.</summary>
S1IsDeadAtTheMomentAndCannotBeSummoned = 1844,
///<summary>Hero weapons cannot be destroyed.</summary>
HeroWeaponsCantDestroyed = 1845,
///<summary>You are too far away from the Strider to mount it.</summary>
TooFarAwayFromStriderToMount = 1846,
///<summary>You caught a fish $s1 in length.</summary>
CaughtFishS1Length = 1847,
///<summary>Because of the size of fish caught, you will be registered in the ranking.</summary>
RegisteredInFishSizeRanking = 1848,
///<summary>All of $s1 will be discarded. Would you like to continue?.</summary>
ConfirmDiscardAllOfS1 = 1849,
///<summary>The Captain of the Order of Knights cannot be appointed.</summary>
CaptainOfOrderOfKnightsCannotBeAppointed = 1850,
///<summary>The Captain of the Royal Guard cannot be appointed.</summary>
CaptainOfRoyalGuardCannotBeAppointed = 1851,
///<summary>The attempt to acquire the skill has failed because of an insufficient Clan Reputation Score.</summary>
AcquireSkillFailedBadClanRepScore = 1852,
///<summary>Quantity items of the same type cannot be exchanged at the same time.</summary>
CantExchangeQuantityItemsOfSameType = 1853,
///<summary>The item was converted successfully.</summary>
ItemConvertedSuccessfully = 1854,
///<summary>Another military unit is already using that name. Please enter a different name.</summary>
AnotherMilitaryUnitIsAlreadyUsingThatName = 1855,
///<summary>Since your opponent is now the owner of $s1, the Olympiad has been cancelled.</summary>
OpponentPossessesS1OlympiadCancelled = 1856,
///<summary>$s1 is the owner of $s2 and cannot participate in the Olympiad.</summary>
S1OwnsS2AndCannotParticipateInOlympiad = 1857,
///<summary>You cannot participate in the Olympiad while dead.</summary>
CannotParticipateOlympiadWhileDead = 1858,
///<summary>You exceeded the quantity that can be moved at one time.</summary>
ExceededQuantityForMoved = 1859,
///<summary>The Clan Reputation Score is too low.</summary>
TheClanReputationScoreIsTooLow = 1860,
///<summary>The clan's crest has been deleted.</summary>
ClanCrestHasBeenDeleted = 1861,
///<summary>Clan skills will now be activated since the clan's reputation score is 0 or higher.</summary>
ClanSkillsWillBeActivatedSinceReputationIs0OrHigher = 1862,
///<summary>$s1 purchased a clan item, reducing the Clan Reputation by $s2 points.</summary>
S1PurchasedClanItemReducingS2RepuPoints = 1863,
///<summary>Your pet/servitor is unresponsive and will not obey any orders.</summary>
PetRefusingOrder = 1864,
///<summary>Your pet/servitor is currently in a state of distress.</summary>
PetInStateOfDistress = 1865,
///<summary>MP was reduced by $s1.</summary>
MpReducedByS1 = 1866,
///<summary>Your opponent's MP was reduced by $s1.</summary>
YourOpponentsMpWasReducedByS1 = 1867,
///<summary>You cannot exchange an item while it is being used.</summary>
CannotExchanceUsedItem = 1868,
///<summary>$s1 has granted the Command Channel's master party the privilege of item looting.</summary>
S1GrantedMasterPartyLootingRights = 1869,
///<summary>A Command Channel with looting rights already exists.</summary>
CommandChannelWithLootingRightsExists = 1870,
///<summary>Do you want to dismiss $s1 from the clan?.</summary>
ConfirmDismissS1FromClan = 1871,
///<summary>You have $s1 hour(s) and $s2 minute(s) left.</summary>
S1HoursS2MinutesLeft = 1872,
///<summary>There are $s1 hour(s) and $s2 minute(s) left in the fixed use time for this PC Cafe.</summary>
S1HoursS2MinutesLeftForThisPccafe = 1873,
///<summary>There are $s1 minute(s) left for this individual user.</summary>
S1MinutesLeftForThisUser = 1874,
///<summary>There are $s1 minute(s) left in the fixed use time for this PC Cafe.</summary>
S1MinutesLeftForThisPccafe = 1875,
///<summary>Do you want to leave $s1 clan?.</summary>
ConfirmLeaveS1Clan = 1876,
///<summary>The game will end in $s1 minutes.</summary>
GameWillEndInS1Minutes = 1877,
///<summary>The game will end in $s1 seconds.</summary>
GameWillEndInS1Seconds = 1878,
///<summary>In $s1 minute(s), you will be teleported outside of the game arena.</summary>
InS1MinutesTeleportedOutsideOfGameArena = 1879,
///<summary>In $s1 seconds(s), you will be teleported outside of the game arena.</summary>
InS1SecondsTeleportedOutsideOfGameArena = 1880,
///<summary>The preliminary match will begin in $s1 second(s). Prepare yourself.</summary>
PreliminaryMatchBeginInS1Seconds = 1881,
///<summary>Characters cannot be created from this server.</summary>
CharactersNotCreatedFromThisServer = 1882,
///<summary>There are no offerings I own or I made a bid for.</summary>
NoOfferingsOwnOrMadeBidFor = 1883,
///<summary>Enter the PC Room coupon serial number.</summary>
EnterPcroomSerialNumber = 1884,
///<summary>This serial number cannot be entered. Please try again in minute(s).</summary>
SerialNumberCantEntered = 1885,
///<summary>This serial has already been used.</summary>
SerialNumberAlreadyUsed = 1886,
///<summary>Invalid serial number. Your attempt to enter the number has failed time(s). You will be allowed to make more attempt(s).</summary>
SerialNumberEnteringFailed = 1887,
///<summary>Invalid serial number. Your attempt to enter the number has failed 5 time(s). Please try again in 4 hours.</summary>
SerialNumberEnteringFailed5Times = 1888,
///<summary>Congratulations! You have received $s1.</summary>
CongratulationsReceivedS1 = 1889,
///<summary>Since you have already used this coupon, you may not use this serial number.</summary>
AlreadyUsedCouponNotUseSerialNumber = 1890,
///<summary>You may not use items in a private store or private work shop.</summary>
NotUseItemsInPrivateStore = 1891,
///<summary>The replay file for the previous version cannot be played.</summary>
ReplayFilePreviousVersionCantPlayed = 1892,
///<summary>This file cannot be replayed.</summary>
FileCantReplayed = 1893,
///<summary>A sub-class cannot be created or changed while you are over your weight limit.</summary>
NotSubclassWhileOverweight = 1894,
///<summary>$s1 is in an area which blocks summoning.</summary>
S1InSummonBlockingArea = 1895,
///<summary>$s1 has already been summoned.</summary>
S1AlreadySummoned = 1896,
///<summary>$s1 is required for summoning.</summary>
S1RequiredForSummoning = 1897,
///<summary>$s1 is currently trading or operating a private store and cannot be summoned.</summary>
S1CurrentlyTradingOrOperatingPrivateStoreAndCannotBeSummoned = 1898,
///<summary>Your target is in an area which blocks summoning.</summary>
YourTargetIsInAnAreaWhichBlocksSummoning = 1899,
///<summary>$s1 has entered the party room.</summary>
S1EnteredPartyRoom = 1900,
///<summary>$s1 has invited you to enter the party room.</summary>
S1InvitedYouToPartyRoom = 1901,
///<summary>Incompatible item grade. This item cannot be used.</summary>
IncompatibleItemGrade = 1902,
///<summary>Those of you who have requested NCOTP should run NCOTP by using your cell phone [...].</summary>
Ncotp = 1903,
///<summary>A sub-class may not be created or changed while a servitor or pet is summoned.</summary>
CantSubclassWithSummonedServitor = 1904,
///<summary>$s2 of $s1 will be replaced with $s4 of $s3.</summary>
S2OfS1WillReplacedWithS4OfS3 = 1905,
///<summary>Select the combat unit.</summary>
SelectCombatUnit = 1906,
///<summary>Select the character who will [...].</summary>
SelectCharacterWhoWill = 1907,
///<summary>$s1 in a state which prevents summoning.</summary>
S1StateForbidsSummoning = 1908,
///<summary>==List of Academy Graduates During the Past Week==.</summary>
AcademyListHeader = 1909,
///<summary>Graduates: $s1.</summary>
GraduatesS1 = 1910,
///<summary>You cannot summon players who are currently participating in the Grand Olympiad.</summary>
YouCannotSummonPlayersWhoAreInOlympiad = 1911,
///<summary>Only those requesting NCOTP should make an entry into this field.</summary>
Ncotp2 = 1912,
///<summary>The remaining recycle time for $s1 is $s2 minute(s).</summary>
TimeForS1IsS2MinutesRemaining = 1913,
///<summary>The remaining recycle time for $s1 is $s2 seconds(s).</summary>
TimeForS1IsS2SecondsRemaining = 1914,
///<summary>The game will end in $s1 second(s).</summary>
GameEndsInS1Seconds = 1915,
///<summary>Your Death Penalty is now level $s1.</summary>
DeathPenaltyLevelS1Added = 1916,
///<summary>Your Death Penalty has been lifted.</summary>
DeathPenaltyLifted = 1917,
///<summary>Your pet is too high level to control.</summary>
PetTooHighToControl = 1918,
///<summary>The Grand Olympiad registration period has ended.</summary>
OlympiadRegistrationPeriodEnded = 1919,
///<summary>Your account is currently inactive because you have not logged into the game for some time. You may reactivate your account by visiting the PlayNC website (http://www.plaync.com/us/support/).</summary>
AccountInactivity = 1920,
///<summary>$s2 hour(s) and $s3 minute(s) have passed since $s1 has killed.</summary>
S2HoursS3MinutesSinceS1Killed = 1921,
///<summary>Because $s1 has failed to kill for one full day, it has expired.</summary>
S1FailedKillingExpired = 1922,
///<summary>Court Magician: The portal has been created!.</summary>
CourtMagicianCreatedPortal = 1923,
///<summary>Current Location: $s1, $s2, $s3 (Near the Primeval Isle).</summary>
LocPrimevalIsleS1S2S3 = 1924,
///<summary>Due to the affects of the Seal of Strife, it is not possible to summon at this time.</summary>
SealOfStrifeForbidsSummoning = 1925,
///<summary>There is no opponent to receive your challenge for a duel.</summary>
ThereIsNoOpponentToReceiveYourChallengeForADuel = 1926,
///<summary>$s1 has been challenged to a duel.</summary>
S1HasBeenChallengedToADuel = 1927,
///<summary>$s1's party has been challenged to a duel.</summary>
S1PartyHasBeenChallengedToADuel = 1928,
///<summary>$s1 has accepted your challenge to a duel. The duel will begin in a few moments.</summary>
S1HasAcceptedYourChallengeToADuelTheDuelWillBeginInAFewMoments = 1929,
///<summary>You have accepted $s1's challenge to a duel. The duel will begin in a few moments.</summary>
YouHaveAcceptedS1ChallengeToADuelTheDuelWillBeginInAFewMoments = 1930,
///<summary>$s1 has declined your challenge to a duel.</summary>
S1HasDeclinedYourChallengeToADuel = 1931,
///<summary>$s1 has declined your challenge to a duel.</summary>
S1HasDeclinedYourChallengeToADuel2 = 1932,
///<summary>You have accepted $s1's challenge to a party duel. The duel will begin in a few moments.</summary>
YouHaveAcceptedS1ChallengeToAPartyDuelTheDuelWillBeginInAFewMoments = 1933,
///<summary>$s1 has accepted your challenge to duel against their party. The duel will begin in a few moments.</summary>
S1HasAcceptedYourChallengeToDuelAgainstTheirPartyTheDuelWillBeginInAFewMoments = 1934,
///<summary>$s1 has declined your challenge to a party duel.</summary>
S1HasDeclinedYourChallengeToAPartyDuel = 1935,
///<summary>The opposing party has declined your challenge to a duel.</summary>
TheOpposingPartyHasDeclinedYourChallengeToADuel = 1936,
///<summary>Since the person you challenged is not currently in a party, they cannot duel against your party.</summary>
SinceThePersonYouChallengedIsNotCurrentlyInAPartyTheyCannotDuelAgainstYourParty = 1937,
///<summary>$s1 has challenged you to a duel.</summary>
S1HasChallengedYouToADuel = 1938,
///<summary>$s1's party has challenged your party to a duel.</summary>
S1PartyHasChallengedYourPartyToADuel = 1939,
///<summary>You are unable to request a duel at this time.</summary>
YouAreUnableToRequestADuelAtThisTime = 1940,
///<summary>This is no suitable place to challenge anyone or party to a duel.</summary>
NoPlaceForDuel = 1941,
///<summary>The opposing party is currently unable to accept a challenge to a duel.</summary>
TheOpposingPartyIsCurrentlyUnableToAcceptAChallengeToADuel = 1942,
///<summary>The opposing party is currently not in a suitable location for a duel.</summary>
TheOpposingPartyIsAtBadLocationForADuel = 1943,
///<summary>In a moment, you will be transported to the site where the duel will take place.</summary>
InAMomentYouWillBeTransportedToTheSiteWhereTheDuelWillTakePlace = 1944,
///<summary>The duel will begin in $s1 second(s).</summary>
TheDuelWillBeginInS1Seconds = 1945,
///<summary>$s1 has challenged you to a duel. Will you accept?.</summary>
S1ChallengedYouToADuel = 1946,
///<summary>$s1's party has challenged your party to a duel. Will you accept?.</summary>
S1ChallengedYouToAPartyDuel = 1947,
///<summary>The duel will begin in $s1 second(s).</summary>
TheDuelWillBeginInS1Seconds2 = 1948,
///<summary>Let the duel begin!.</summary>
LetTheDuelBegin = 1949,
///<summary>$s1 has won the duel.</summary>
S1HasWonTheDuel = 1950,
///<summary>$s1's party has won the duel.</summary>
S1PartyHasWonTheDuel = 1951,
///<summary>The duel has ended in a tie.</summary>
TheDuelHasEndedInATie = 1952,
///<summary>Since $s1 was disqualified, $s2 has won.</summary>
SinceS1WasDisqualifiedS2HasWon = 1953,
///<summary>Since $s1's party was disqualified, $s2's party has won.</summary>
SinceS1PartyWasDisqualifiedS2PartyHasWon = 1954,
///<summary>Since $s1 withdrew from the duel, $s2 has won.</summary>
SinceS1WithdrewFromTheDuelS2HasWon = 1955,
///<summary>Since $s1's party withdrew from the duel, $s2's party has won.</summary>
SinceS1PartyWithdrewFromTheDuelS2PartyHasWon = 1956,
///<summary>Select the item to be augmented.</summary>
SelectTheItemToBeAugmented = 1957,
///<summary>Select the catalyst for augmentation.</summary>
SelectTheCatalystForAugmentation = 1958,
///<summary>Requires $s1 $s2.</summary>
RequiresS1S2 = 1959,
///<summary>This is not a suitable item.</summary>
ThisIsNotASuitableItem = 1960,
///<summary>Gemstone quantity is incorrect.</summary>
GemstoneQuantityIsIncorrect = 1961,
///<summary>The item was successfully augmented!.</summary>
TheItemWasSuccessfullyAugmented = 1962,
///<summary>Select the item from which you wish to remove augmentation.</summary>
SelectTheItemFromWhichYouWishToRemoveAugmentation = 1963,
///<summary>Augmentation removal can only be done on an augmented item.</summary>
AugmentationRemovalCanOnlyBeDoneOnAnAugmentedItem = 1964,
///<summary>Augmentation has been successfully removed from your $s1.</summary>
AugmentationHasBeenSuccessfullyRemovedFromYourS1 = 1965,
///<summary>Only the clan leader may issue commands.</summary>
OnlyClanLeaderCanIssueCommands = 1966,
///<summary>The gate is firmly locked. Please try again later.</summary>
GateLockedTryAgainLater = 1967,
///<summary>$s1's owner.</summary>
S1Owner = 1968,
///<summary>Area where $s1 appears.</summary>
AreaS1Appears = 1968,
///<summary>Once an item is augmented, it cannot be augmented again.</summary>
OnceAnItemIsAugmentedItCannotBeAugmentedAgain = 1970,
///<summary>The level of the hardener is too high to be used.</summary>
HardenerLevelTooHigh = 1971,
///<summary>You cannot augment items while a private store or private workshop is in operation.</summary>
YouCannotAugmentItemsWhileAPrivateStoreOrPrivateWorkshopIsInOperation = 1972,
///<summary>You cannot augment items while frozen.</summary>
YouCannotAugmentItemsWhileFrozen = 1973,
///<summary>You cannot augment items while dead.</summary>
YouCannotAugmentItemsWhileDead = 1974,
///<summary>You cannot augment items while engaged in trade activities.</summary>
YouCannotAugmentItemsWhileTrading = 1975,
///<summary>You cannot augment items while paralyzed.</summary>
YouCannotAugmentItemsWhileParalyzed = 1976,
///<summary>You cannot augment items while fishing.</summary>
YouCannotAugmentItemsWhileFishing = 1977,
///<summary>You cannot augment items while sitting down.</summary>
YouCannotAugmentItemsWhileSittingDown = 1978,
///<summary>$s1's remaining Mana is now 10.</summary>
S1SRemainingManaIsNow10 = 1979,
///<summary>$s1's remaining Mana is now 5.</summary>
S1SRemainingManaIsNow5 = 1980,
///<summary>$s1's remaining Mana is now 1. It will disappear soon.</summary>
S1SRemainingManaIsNow1 = 1981,
///<summary>$s1's remaining Mana is now 0, and the item has disappeared.</summary>
S1SRemainingManaIsNow0 = 1982,
///<summary>Press the Augment button to begin.</summary>
PressTheAugmentButtonToBegin = 1984,
///<summary>$s1's drop area ($s2).</summary>
S1DropAreaS2 = 1985,
///<summary>$s1's owner ($s2).</summary>
S1OwnerS2 = 1986,
///<summary>$s1.</summary>
S1 = 1987,
///<summary>The ferry has arrived at Primeval Isle.</summary>
FerryArrivedAtPrimeval = 1988,
///<summary>The ferry will leave for Rune Harbor after anchoring for three minutes.</summary>
FerryLeavingForRune3Minutes = 1989,
///<summary>The ferry is now departing Primeval Isle for Rune Harbor.</summary>
FerryLeavingPrimevalForRuneNow = 1990,
///<summary>The ferry will leave for Primeval Isle after anchoring for three minutes.</summary>
FerryLeavingForPrimeval3Minutes = 1991,
///<summary>The ferry is now departing Rune Harbor for Primeval Isle.</summary>
FerryLeavingRuneForPrimevalNow = 1992,
///<summary>The ferry from Primeval Isle to Rune Harbor has been delayed.</summary>
FerryFromPrimevalToRuneDelayed = 1993,
///<summary>The ferry from Rune Harbor to Primeval Isle has been delayed.</summary>
FerryFromRuneToPrimevalDelayed = 1994,
///<summary>$s1 channel filtering option.</summary>
S1ChannelFilterOption = 1995,
///<summary>The attack has been blocked.</summary>
AttackWasBlocked = 1996,
///<summary>$s1 is performing a counterattack.</summary>
S1PerformingCounterattack = 1997,
///<summary>You countered $s1's attack.</summary>
CounteredS1Attack = 1998,
///<summary>$s1 dodges the attack.</summary>
S1DodgesAttack = 1999,
///<summary>You have avoided $s1's attack.</summary>
AvoidedS1Attack2 = 2000,
///<summary>Augmentation failed due to inappropriate conditions.</summary>
AugmentationFailedDueToInappropriateConditions = 2001,
///<summary>Trap failed.</summary>
TrapFailed = 2002,
///<summary>You obtained an ordinary material.</summary>
ObtainedOrdinaryMaterial = 2003,
///<summary>You obtained a rare material.</summary>
ObtainedRateMaterial = 2004,
///<summary>You obtained a unique material.</summary>
ObtainedUniqueMaterial = 2005,
///<summary>You obtained the only material of this kind.</summary>
ObtainedOnlyMaterial = 2006,
///<summary>Please enter the recipient's name.</summary>
EnterRecipientsName = 2007,
///<summary>Please enter the text.</summary>
EnterText = 2008,
///<summary>You cannot exceed 1500 characters.</summary>
CantExceed1500Characters = 2009,
///<summary>$s2 $s1.</summary>
S2S1 = 2009,
///<summary>The augmented item cannot be discarded.</summary>
AugmentedItemCannotBeDiscarded = 2011,
///<summary>$s1 has been activated.</summary>
S1HasBeenActivated = 2012,
///<summary>Your seed or remaining purchase amount is inadequate.</summary>
YourSeedOrRemainingPurchaseAmountIsInadequate = 2013,
///<summary>You cannot proceed because the manor cannot accept any more crops. All crops have been returned and no adena withdrawn.</summary>
ManorCantAcceptMoreCrops = 2014,
///<summary>A skill is ready to be used again.</summary>
SkillReadyToUseAgain = 2015,
///<summary>A skill is ready to be used again but its re-use counter time has increased.</summary>
SkillReadyToUseAgainButTimeIncreased = 2016,
///<summary>$s1 cannot duel because $s1 is currently engaged in a private store or manufacture.</summary>
S1CannotDuelBecauseS1IsCurrentlyEngagedInAPrivateStoreOrManufacture = 2017,
///<summary>$s1 cannot duel because $s1 is currently fishing.</summary>
S1CannotDuelBecauseS1IsCurrentlyFishing = 2018,
///<summary>$s1 cannot duel because $s1's HP or MP is below 50%.</summary>
S1CannotDuelBecauseS1HpOrMpIsBelow50Percent = 2019,
///<summary>$s1 cannot make a challenge to a duel because $s1 is currently in a duel-prohibited area (Peaceful Zone / Seven Signs Zone / Near Water / Restart Prohibited Area).</summary>
S1CannotMakeAChallangeToADuelBecauseS1IsCurrentlyInADuelProhibitedArea = 2020,
///<summary>$s1 cannot duel because $s1 is currently engaged in battle.</summary>
S1CannotDuelBecauseS1IsCurrentlyEngagedInBattle = 2021,
///<summary>$s1 cannot duel because $s1 is already engaged in a duel.</summary>
S1CannotDuelBecauseS1IsAlreadyEngagedInADuel = 2022,
///<summary>$s1 cannot duel because $s1 is in a chaotic state.</summary>
S1CannotDuelBecauseS1IsInAChaoticState = 2023,
///<summary>$s1 cannot duel because $s1 is participating in the Olympiad.</summary>
S1CannotDuelBecauseS1IsParticipatingInTheOlympiad = 2024,
///<summary>$s1 cannot duel because $s1 is participating in a clan hall war.</summary>
S1CannotDuelBecauseS1IsParticipatingInAClanHallWar = 2025,
///<summary>$s1 cannot duel because $s1 is participating in a siege war.</summary>
S1CannotDuelBecauseS1IsParticipatingInASiegeWar = 2026,
///<summary>$s1 cannot duel because $s1 is currently riding a boat or strider.</summary>
S1CannotDuelBecauseS1IsCurrentlyRidingABoatWyvernOrStrider = 2027,
///<summary>$s1 cannot receive a duel challenge because $s1 is too far away.</summary>
S1CannotReceiveADuelChallengeBecauseS1IsTooFarAway = 2028,
///<summary>$s1 is currently teleporting and cannot participate in the Olympiad.</summary>
S1CannotParticipateInOlympiadDuringTeleport = 2029,
///<summary>You are currently logging in.</summary>
CurrentlyLoggingIn = 2030,
///<summary>Please wait a moment.</summary>
PleaseWaitAMoment = 2031,
//Added (Missing?)
///<summary>You can only register 16x12 pixel 256 color bmp files.</summary>
CanOnlyRegister1612Px256ColorBmpFiles = 211,
///<summary>Incorrect item.</summary>
IncorrectItem = 352,
//Other messages (Interlude+) being referenced in the project
///<summary>You already polymorphed and cannot polymorph again.</summary>
AlreadyPolymorphedCannotPolymorphAgain = 2058,
///<summary>You cannot polymorph into the desired form in water.</summary>
CannotPolymorphIntoTheDesiredFormInWater = 2060,
///<summary>You cannot polymorph when you have summoned a servitor/pet.</summary>
CannotPolymorphWhenSummonedServitor = 2062,
///<summary>You cannot polymorph while riding a pet.</summary>
CannotPolymorphWhileRidingPet = 2063,
///<summary>//You cannot enter due to the party having exceeded the limit.</summary>
CannotEnterDuePartyHavingExceedLimit = 2102,
///<summary>The augmented item cannot be converted. Please convert after the augmentation has been removed.</summary>
AugmentedItemCannotBeConverted = 2129,
///<summary>You cannot convert this item.</summary>
CannotConvertThisItem = 2130,
///<summary>Your soul count has increased by $s1. It is now at $s2.</summary>
YourSoulCountHasIncreasedByS1NowAtS2 = 2162,
///<summary>Soul cannot be increased anymore.</summary>
SoulCannotBeIncreasedAnymore = 2163,
///<summary>You cannot polymorph while riding a boat.</summary>
CannotPolymorphWhileRidingBoat = 2182,
///<summary>Another enchantment is in progress. Please complete the previous task, then try again.</summary>
AnotherEnchantmentIsInProgress = 2188,
///<summary>Not enough bolts.</summary>
NotEnoughBolts = 2226,
///<summary>$c1 has given $c2 damage of $s3.</summary>
C1HasGivenC2DamageOfS3 = 2261,
///<summary>$c1 has received $s3 damage from $c2.</summary>
C1HasReceivedS3DamageFromC2 = 2262,
///<summary>$c1 has evaded $c2's attack.</summary>
C1HasEvadedC2Attack = 2264,
///<summary>$c1's attack went astray.</summary>
C1AttackWentAstray = 2265,
///<summary>$c1 landed a critical hit!.</summary>
C1LandedACriticalHit = 2266,
///<summary>You cannot transform while sitting.</summary>
CannotTransformWhileSitting = 2283,
///<summary>The length of the crest or insignia does not meet the standard requirements.</summary>
LengthCrestDoesNotMeetStandardRequirements = 2285,
///<summary>There are $s2 second(s) remaining in $s1's re-use time.</summary>
S2SecondsRemainingInS1ReuseTime = 2303,
///<summary>There are $s2 minute(s), $s3 second(s) remaining in $s1's re-use time.</summary>
S2MinutesS3SecondsRemainingInS1ReuseTime = 2304,
///<summary>There are $s2 hour(s), $s3 minute(s), and $s4 second(s) remaining in $s1's re-use time.</summary>
S2HoursS3MinutesS4SecondsRemainingInS1ReuseTime = 2305,
///<summary>This is an incorrect support enhancement spellbook.</summary>
IncorrectSupportEnhancementSpellbook = 2385,
///<summary>This item does not meet the requirements for the support enhancement spellbook.</summary>
ItemDoesNotMeetRequirementsForSupportEnhancementSpellbook = 2386,
///<summary>Registration of the support enhancement spellbook has failed.</summary>
RegistrationOfEnhancementSpellbookHasFailed = 2387,
///<summary>You cannot use My Teleports while flying.</summary>
CannotUseMyTeleportsWhileFlying = 2351,
///<summary>You cannot use My Teleports while you are dead.</summary>
CannotUseMyTeleportsWhileDead = 2354,
///<summary>You cannot use My Teleports underwater.</summary>
CannotUseMyTeleportsUnderwater = 2356,
///<summary>You have no space to save the teleport location.</summary>
NoSpaceToSaveTeleportLocation = 2358,
///<summary>You cannot teleport because you do not have a teleport item.</summary>
CannotTeleportBecauseDoNotHaveTeleportItem = 2359,
///<summary>Your number of My Teleports slots has reached its maximum limit.</summary>
YourNumberOfMyTeleportsSlotsHasReachedLimit = 2390,
///<summary>The number of My Teleports slots has been increased.</summary>
NumberOfMyTeleportsSlotsHasBeenIncreased = 2409,
///<summary>//You cannot teleport while in possession of a ward.</summary>
CannotTeleportWhilePossessionWard = 2778,
///<summary>You could not receive because your inventory is full.</summary>
YouCouldNotReceiveBecauseYourInventoryIsFull = 2981,
//A user currently participating in the Olympiad cannot send party and friend invitations.
UserCurrentlyParticipatingInOlympiadCannotSendPartyAndFriendInvitations = 3094,
///<summary>Requesting approval for changing party loot to "$s1".</summary>
RequestingApprovalForChangingPartyLootToS1 = 3135,
///<summary>Party loot change was cancelled.</summary>
PartyLootChangeWasCancelled = 3137,
///<summary>Party loot was changed to "$s1".</summary>
PartyLootWasChangedToS1 = 3138,
///<summary>The crest was successfully registered.</summary>
ClanCrestWasSuccesfullyRegistered = 3140,
///<summary>$c1 is set to refuse party requests and cannot receive a party request.</summary>
C1IsSetToRefusePartyRequests = 3168,
///<summary>You cannot bookmark this location because you do not have a My Teleport Flag.</summary>
CannotBookmarkThisLocationBecauseNoMyTeleportFlag = 6501,
//No description found
NotImplementedYet2361 = 2361
}
}
| 41.21342 | 241 | 0.664806 | [
"MPL-2.0",
"MPL-2.0-no-copyleft-exception"
] | dr3dd/L2Interlude | Core/Module/Player/SystemMessageId.cs | 248,148 | C# |
namespace CapSharp
{
public interface ICapSharp
{
/// <summary>
/// Try to solve the captcha
/// </summary>
/// <param name="AccessToken"></param>
/// <returns></returns>
public bool TrySolveCaptcha(out string AccessToken);
/// <summary>
/// Attempt to obtain the user balance
/// </summary>
/// <param name="Balance">Balance</param>
/// <returns>Returns <see cref="false"/> if a problem occurred, if throwing exceptions is enabled, an exception with error details will throw. If everything is correct, returns <see cref="true"/>. </returns>
public bool TryGetUserBalance(out string Balance);
}
} | 37.157895 | 215 | 0.606232 | [
"Apache-2.0"
] | biitez/CapSharp | CapSharp/ICapSharp.cs | 708 | C# |
namespace DataObjects.DTOS.lookups
{
public class HarvestingOptionsDTO : GenericLookup, IComboBoxValue { }
} | 28.25 | 73 | 0.787611 | [
"MIT"
] | GeorgeThackrayWT/GraphQLSample | ED/DataObjects/DTOS/lookups/HarvestingOptionsDTO.cs | 115 | C# |
using MediatR;
namespace SESMTTech.Gestor.PlanosDeAcao.WebApi.Queries.PlanoDeAcao
{
public class ObterItensDePlanoDeAcaoPendentesAtribuidosAoUsuarioQuery : IRequest<ObterItensDePlanoDeAcaoPendentesAtribuidosAoUsuarioQueryResult>
{
public string Email { get; set; }
}
} | 32.222222 | 148 | 0.8 | [
"MIT"
] | sesmt-tecnologico/gestor-planodeacao | src/SESMTTech.Gestor.PlanosDeAcao.WebApi/Queries/PlanoDeAcao/ObterItensDePlanoDeAcaoPendentesAtribuidosAoUsuarioQuery.cs | 292 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
namespace CSharpForMarkupExample.iOS
{
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, "AppDelegate");
}
}
}
| 23.52381 | 91 | 0.6417 | [
"MIT"
] | BretJohnson/CSharpForMarkup | Example/iOS/Main.cs | 496 | C# |
// This file is auto-generated, don't edit it. Thanks.
using System;
using System.Collections.Generic;
using System.IO;
using Tea;
namespace AntChain.SDK.ENT.Models
{
public class GetUserSharecodeResponse : TeaModel {
// 请求唯一ID,用于链路跟踪和问题排查
[NameInMap("req_msg_id")]
[Validation(Required=false)]
public string ReqMsgId { get; set; }
// 结果码,一般OK表示调用成功
[NameInMap("result_code")]
[Validation(Required=false)]
public string ResultCode { get; set; }
// 异常信息的文本描述
[NameInMap("result_msg")]
[Validation(Required=false)]
public string ResultMsg { get; set; }
// 分享码
[NameInMap("share_code")]
[Validation(Required=false)]
public string ShareCode { get; set; }
}
}
| 22.828571 | 54 | 0.614518 | [
"MIT"
] | alipay/antchain-openapi-prod-sdk | ent/csharp/core/Models/GetUserSharecodeResponse.cs | 879 | C# |
// Copyright © 2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp.Enums
{
/// <summary>
/// Cursor type values.
/// </summary>
public enum CursorType
{
/// <summary>
/// Pointer
/// </summary>
Pointer = 0,
/// <summary>
/// An enum constant representing the cross option.
/// </summary>
Cross,
/// <summary>
/// An enum constant representing the hand option.
/// </summary>
Hand,
/// <summary>
/// An enum constant representing the beam option.
/// </summary>
IBeam,
/// <summary>
/// An enum constant representing the wait option.
/// </summary>
Wait,
/// <summary>
/// An enum constant representing the help option.
/// </summary>
Help,
/// <summary>
/// An enum constant representing the east resize option.
/// </summary>
EastResize,
/// <summary>
/// An enum constant representing the north resize option.
/// </summary>
NorthResize,
/// <summary>
/// An enum constant representing the northeast resize option.
/// </summary>
NortheastResize,
/// <summary>
/// An enum constant representing the northwest resize option.
/// </summary>
NorthwestResize,
/// <summary>
/// An enum constant representing the south resize option.
/// </summary>
SouthResize,
/// <summary>
/// An enum constant representing the southeast resize option.
/// </summary>
SoutheastResize,
/// <summary>
/// An enum constant representing the southwest resize option.
/// </summary>
SouthwestResize,
/// <summary>
/// An enum constant representing the west resize option.
/// </summary>
WestResize,
/// <summary>
/// An enum constant representing the north south resize option.
/// </summary>
NorthSouthResize,
/// <summary>
/// An enum constant representing the east west resize option.
/// </summary>
EastWestResize,
/// <summary>
/// An enum constant representing the northeast southwest resize option.
/// </summary>
NortheastSouthwestResize,
/// <summary>
/// An enum constant representing the northwest southeast resize option.
/// </summary>
NorthwestSoutheastResize,
/// <summary>
/// An enum constant representing the column resize option.
/// </summary>
ColumnResize,
/// <summary>
/// An enum constant representing the row resize option.
/// </summary>
RowResize,
/// <summary>
/// An enum constant representing the middle panning option.
/// </summary>
MiddlePanning,
/// <summary>
/// An enum constant representing the east panning option.
/// </summary>
EastPanning,
/// <summary>
/// An enum constant representing the north panning option.
/// </summary>
NorthPanning,
/// <summary>
/// An enum constant representing the northeast panning option.
/// </summary>
NortheastPanning,
/// <summary>
/// An enum constant representing the northwest panning option.
/// </summary>
NorthwestPanning,
/// <summary>
/// An enum constant representing the south panning option.
/// </summary>
SouthPanning,
/// <summary>
/// An enum constant representing the southeast panning option.
/// </summary>
SoutheastPanning,
/// <summary>
/// An enum constant representing the southwest panning option.
/// </summary>
SouthwestPanning,
/// <summary>
/// An enum constant representing the west panning option.
/// </summary>
WestPanning,
/// <summary>
/// An enum constant representing the move option.
/// </summary>
Move,
/// <summary>
/// An enum constant representing the vertical text option.
/// </summary>
VerticalText,
/// <summary>
/// An enum constant representing the cell option.
/// </summary>
Cell,
/// <summary>
/// An enum constant representing the context menu option.
/// </summary>
ContextMenu,
/// <summary>
/// An enum constant representing the alias option.
/// </summary>
Alias,
/// <summary>
/// An enum constant representing the progress option.
/// </summary>
Progress,
/// <summary>
/// An enum constant representing the no drop option.
/// </summary>
NoDrop,
/// <summary>
/// An enum constant representing the copy option.
/// </summary>
Copy,
/// <summary>
/// An enum constant representing the none option.
/// </summary>
None,
/// <summary>
/// An enum constant representing the not allowed option.
/// </summary>
NotAllowed,
/// <summary>
/// An enum constant representing the zoom in option.
/// </summary>
ZoomIn,
/// <summary>
/// An enum constant representing the zoom out option.
/// </summary>
ZoomOut,
/// <summary>
/// An enum constant representing the grab option.
/// </summary>
Grab,
/// <summary>
/// An enum constant representing the grabbing option.
/// </summary>
Grabbing,
/// <summary>
/// An enum constant representing the MiddlePanningVertical option.
/// </summary>
MiddlePanningVertical,
/// <summary>
/// An enum constant representing the MiddlePanningHorizontal option.
/// </summary>
MiddlePanningHorizontal,
/// <summary>
/// An enum constant representing the custom option.
/// </summary>
Custom,
/// <summary>
/// DndNone
/// </summary>
DndNone,
/// <summary>
/// DndMove
/// </summary>
DndMove,
/// <summary>
/// DndCopy
/// </summary>
DndCopy,
/// <summary>
/// DndLink
/// </summary>
DndLink
}
}
| 31.186916 | 100 | 0.52742 | [
"BSD-3-Clause"
] | 591094733/CefSharp | CefSharp/Enums/CursorType.cs | 6,675 | C# |
using Nest;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ElasticToolCon
{
public class KuromojiRomajiTokenFilter : TokenFilterBase
{
public KuromojiRomajiTokenFilter()
: base("kuromoji_readingform")
{
}
[JsonProperty("use_romaji")]
public bool UseRomaji { get; set; }
}
}
| 19.809524 | 60 | 0.658654 | [
"Apache-2.0"
] | chenchenick/RESTJsonPlayer | ElasticToolCon/KuromojiRomajiTokenFilter.cs | 418 | C# |
using MinesweeperBeta.Models;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using MinesweeperBeta.Services;
using Windows.UI;
using System.Collections.ObjectModel;
namespace MinesweeperBeta
{
/// <summary>
/// Page showing the playing field, game title, bombs and flags available.
/// </summary>
public sealed partial class MainPage : Page
{
private GameDifficultyDefinition prevGameComplexity;
/// <summary>
/// Whether the player has yet to visit a cell in a game.
/// </summary>
/// <remarks>
/// Should be reset to true after a new game and set to false after a cell is visited.
/// </remarks>
private bool firstMove = true;
/// <summary>
/// Timer to tick every millisecond.
/// </summary>
private readonly DispatcherTimer Timer = new DispatcherTimer();
/// <summary>
/// DateTime of the start of the current game.
/// </summary>
private DateTime gameStartTime;
/// <summary>
/// Service for setting high scores of different game difficulties.
/// </summary>
private readonly SettingsService settings = new SettingsService();
/// <summary>
/// Matrix of cells represented by buttons on the field.
/// </summary>
private Button[,] cells;
/// <summary>
/// Underlying logic of the game using <see cref="GameGridService"/>.
/// </summary>
private GameGridService game;
/// <summary>
/// Complexity options available to the user.
/// </summary>
private readonly ObservableCollection<GameDifficultyDefinition> complexityOptions =
new ObservableCollection<GameDifficultyDefinition>();
/// <summary>
/// Initializes a new instance of the <see cref="MainPage"/> class.
/// </summary>
public MainPage()
{
this.InitializeComponent();
PlayingField_ViewBox.Stretch = Stretch.Uniform;
InitialiseComplexityOptions();
RestorePlayingField();
HighScorePanel.Refresh();
Timer.Tick += Timer_Tick;
Timer.Interval = new TimeSpan(0, 0, 0, 0, 1);
gameStartTime = DateTime.Now;
Timer.Start();
}
/// <summary>
/// TODO: Move into Models or Repository
/// </summary>
private void InitialiseComplexityOptions()
{
int defaultComplexity = GameDifficultyDefinition.DefaultOptionIndex;
var difficulties = GameDifficultyDefinition.DifficultyOptions();
foreach (var option in difficulties) complexityOptions.Add(option);
prevGameComplexity = complexityOptions[defaultComplexity];
game = new GameGridService(prevGameComplexity.Rows, prevGameComplexity.Columns, prevGameComplexity.Bombs);
NewGameCmplx_Combo.SelectedIndex = defaultComplexity;
}
/// <summary>
/// Checks the user has set a new complexity.
/// </summary>
/// <returns>
/// True if new complexity is set, false otherwise. A new game grid
/// is generated and the visual playing field is reset.
/// </returns>
private bool ReevalGameComplexity()
{
var complexity = NewGameCmplx_Combo.SelectedItem as GameDifficultyDefinition;
if (complexity != prevGameComplexity)
{
prevGameComplexity = complexity;
game = new GameGridService(complexity.Rows, complexity.Columns, complexity.Bombs);
ClearPlayingField();
RestorePlayingField();
return true;
}
return false;
}
/// <summary>
/// Reset displayed board and internal board for a new game.
/// </summary>
private void StartNewGame()
{
var gameComplexityChanged = ReevalGameComplexity();
firstMove = true;
if (!gameComplexityChanged)
{
game.ResetBoard();
UpdateCells();
UpdateFlagsTextBlock();
foreach (CellButton cb in cells) cb.IsEnabled = true;
}
Timer.Start();
gameStartTime = DateTime.Now;
}
/// <summary>
/// Removes all elements from the visual playing field.
/// </summary>
private void ClearPlayingField()
{
PlayingField.RowDefinitions.Clear();
PlayingField.ColumnDefinitions.Clear();
PlayingField.Children.Clear();
}
/// <summary>
/// Formats the <code>PlayingField</code> with the set number
/// of rows and columns of buttons, depending on the game.
/// </summary>
private void RestorePlayingField()
{
cells = new Button[game.Rows, game.Columns];
//Adds one row definition per gameRow and column definition
//per gameColumn
for (int row = 0; row < game.Rows; row++)
{
PlayingField.RowDefinitions.Add(new RowDefinition());
}
for (int col = 0; col < game.Columns; col++)
{
PlayingField.ColumnDefinitions.Add(new ColumnDefinition());
}
for (int row = 0; row < game.Rows; row++)
{
for (int col = 0; col < game.Columns; col++)
{
//Each button uses ButtonRevealStyle, has margin 2 all
//around and stretches to fill the grid spot it is in
CellButton button = new CellButton(row, col)
{
Margin = new Thickness(2.0),
HorizontalAlignment = HorizontalAlignment.Stretch,
VerticalAlignment = VerticalAlignment.Stretch,
};
button.Click += new RoutedEventHandler(CellClickAsync);
button.RightTapped += new RightTappedEventHandler(CellRightTap);
PlayingField.Children.Add(button);
Grid.SetRow(button, row);
Grid.SetColumn(button, col);
cells[row, col] = button;
}
}
Bombs_TextBlock.Text = "Bombs: " + game.BombQuantity;
UpdateFlagsTextBlock();
UpdateCells();
}
/// <summary>
/// Initiates new game process after button click.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void NewGameClick(Object sender, RoutedEventArgs e)
{
StartNewGame();
}
/// <summary>
/// Updates <see cref="Flags_TextBlock"/> with current number of flags
/// still available.
/// </summary>
private void UpdateFlagsTextBlock()
{
Flags_TextBlock.Text = "Flags Available: " + game.FlagsAvailable;
}
/// <summary>
/// Handles cell (button) right click or hold and release.
/// </summary>
/// <param name="sender">
/// The cell (CellButton) upon which the selection was performed.
/// </param>
/// <param name="e">
/// <see cref="RightTappedRoutedEventArgs"/> for associated
/// <see cref="RightTappedEventHandler"/>
/// </param>
/// <remarks>
/// Right click signifies toggling the flag.
/// </remarks>
private void CellRightTap(Object sender, RightTappedRoutedEventArgs e)
{
CellButton b = (CellButton)sender;
game.ToggleFlag(b.Row, b.Column);
UpdateCells();
UpdateFlagsTextBlock();
if (!firstMove) CheckIfWon();
}
/// <summary>
/// Handles cell (button) click or tap.
/// </summary>
/// <param name="sender">
/// The cell (CellButton) upon which the selection was performed.
/// </param>
/// <param name="e">
/// <see cref="RoutedEventArgs"/> for associated
/// <see cref="RoutedEvent"/>
/// </param>
private async void CellClickAsync(Object sender, RoutedEventArgs e)
{
CellButton b = (CellButton)sender;
//If cell flagged, do nothing
if (game.VisitedPoints[b.Row, b.Column] == -1) return;
//If cell not flagged, but no other moves made
//generate bombs so that the user cannot activate
//bomb on first move.
if (firstMove)
{
firstMove = false;
game.GenerateBombs(b.Row, b.Column);
UpdateCells();
return;
}
bool notLost = game.SelectPoint(b.Row, b.Column);
var lostDialog = new ContentDialog
{
Title = "Game Over",
Content = "You've hit a mine!",
PrimaryButtonText = "Restart",
SecondaryButtonText = "Close"
};
UpdateCells();
//If selection performed on bomb, reveal bombs
//and allow the user to restart or close the dialog
if (!notLost)
{
Timer.Stop();
game.RevealBombs();
UpdateCells();
var dialogReturn = await lostDialog.ShowAsync();
switch (dialogReturn)
{
case ContentDialogResult.Primary: //Restart button
StartNewGame();
break;
case ContentDialogResult.Secondary: //Close button
break;
}
}
else CheckIfWon();
}
/// <summary>
/// Update time displayed with the difference of the game
/// start time and the current time in seconds.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Timer_Tick(object sender, object e)
{
var timeDiff = DateTime.Now - gameStartTime;
Time.Text = String.Format("{0:#,0.00}", timeDiff.TotalSeconds);
}
/// <summary>
/// Updates text of cells based on their value.
/// </summary>
private void UpdateCells()
{
for (int row = 0; row < game.Rows; row++)
{
for (int col = 0; col < game.Columns; col++)
{
int cellVisitState = game.VisitedPoints[row, col];
int cellValue = game.BombsAndValues[row, col];
switch (cellVisitState)
{
case 1:
switch (cellValue)
{
case -1:
//Bomb emoji
cells[row, col].Content = "\uD83D\uDCA3";
break;
case 0:
//No text for 0 value cells
cells[row, col].Content = "";
break;
default:
//Cell value which is at least 1.
cells[row, col].Content = cellValue;
break;
}
//Disable cells that are visited
cells[row, col].IsEnabled = false;
break;
case 0:
//Mathematic asterix
cells[row, col].Content = "\u2217";
cells[row, col].IsEnabled = true;
cells[row, col].BorderBrush = new RevealBackgroundBrush();
break;
case -1:
//Flag symbol
cells[row, col].Content = "\u2691";
cells[row, col].BorderBrush = new RevealBackgroundBrush
{
Color = Color.FromArgb(255, 255, 255, 0)
};
break;
}
}
}
}
/// <summary>
/// Displays dialog if game won.
/// </summary>
public async void CheckIfWon()
{
if (game.Success())
{
double gameDuration = (DateTime.Now - gameStartTime).TotalSeconds;
Timer.Stop();
var newFastest = settings.UpdateTime(prevGameComplexity.Complexity, gameDuration);
var wonDialog = new ContentDialog
{
Title = newFastest ? $"New High Score: {gameDuration}" : "Game Won",
Content = "You've successfully avoided all bombs",
PrimaryButtonText = "Restart",
SecondaryButtonText = "Close"
};
if (newFastest) HighScorePanel.Refresh();
var dialogReturn = await wonDialog.ShowAsync();
switch (dialogReturn)
{
case ContentDialogResult.Primary:
StartNewGame();
break;
case ContentDialogResult.Secondary:
break;
}
}
}
}
}
| 35.4775 | 118 | 0.502079 | [
"MIT"
] | kojo12228/MinesweeperBetaUWP | MinesweeperBeta/MainPage.xaml.cs | 14,193 | C# |
namespace Ferarri
{
public abstract class Car : ICar
{
public abstract string Model { get; }
public string Driver { get; private set; }
protected Car(string driver)
{
this.Driver = driver;
}
}
}
| 18.714286 | 50 | 0.538168 | [
"MIT"
] | amartinn/SoftUni | C# Advanced September 2019/C# OOP/exercises/Interfaces and Abstraction - Exercise/Ferarri/Car.cs | 264 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace WebLoadTest
{
/// <summary>
/// Summary description for StockWebService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class StockWebService : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
| 25.851852 | 107 | 0.716332 | [
"Apache-2.0"
] | DavidChristiansen/MassTransit | src/Samples/WebLoadTest/WebLoadTest/StockWebService.asmx.cs | 700 | C# |
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using FantasyData.Api.Client.NetCore.Model.NBA;
namespace FantasyData.Api.Client.NetCore
{
public partial class NBAv2Client : BaseClient
{
public NBAv2Client(string apiKey) : base(apiKey) { }
public NBAv2Client(Guid apiKey) : base(apiKey) { }
/// <summary>
/// Get Are Games In Progress Asynchronous
/// </summary>
public Task<bool> GetAreAnyGamesInProgressAsync()
{
var parameters = new List<KeyValuePair<string, string>>();
return Task.Run<bool>(() =>
base.Get<bool>("/nba/v2/{format}/AreAnyGamesInProgress", parameters)
);
}
/// <summary>
/// Get Are Games In Progress
/// </summary>
public bool GetAreAnyGamesInProgress()
{
return this.GetAreAnyGamesInProgressAsync().Result;
}
/// <summary>
/// Get Box Score Asynchronous
/// </summary>
/// <param name="gameid">The GameID of an NBA game. GameIDs can be found in the Games API. Valid entries are <code>14620</code> or <code>16905</code></param>
public Task<BoxScore> GetBoxScoreAsync(int gameid)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("gameid", gameid.ToString()));
return Task.Run<BoxScore>(() =>
base.Get<BoxScore>("/nba/v2/{format}/BoxScore/{gameid}", parameters)
);
}
/// <summary>
/// Get Box Score
/// </summary>
/// <param name="gameid">The GameID of an NBA game. GameIDs can be found in the Games API. Valid entries are <code>14620</code> or <code>16905</code></param>
public BoxScore GetBoxScore(int gameid)
{
return this.GetBoxScoreAsync(gameid).Result;
}
/// <summary>
/// Get Box Scores by Date Asynchronous
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public Task<List<BoxScore>> GetBoxScoresAsync(string date)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("date", date.ToString()));
return Task.Run<List<BoxScore>>(() =>
base.Get<List<BoxScore>>("/nba/v2/{format}/BoxScores/{date}", parameters)
);
}
/// <summary>
/// Get Box Scores by Date
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public List<BoxScore> GetBoxScores(string date)
{
return this.GetBoxScoresAsync(date).Result;
}
/// <summary>
/// Get Box Scores by Date Delta Asynchronous
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
/// <param name="minutes">Only returns player statistics that have changed in the last X minutes. You specify how many minutes in time to go back. Valid entries are: <code>1</code> or <code>2</code>.</param>
public Task<List<BoxScore>> GetBoxScoresDeltaAsync(string date, string minutes)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("date", date.ToString()));
parameters.Add(new KeyValuePair<string, string>("minutes", minutes.ToString()));
return Task.Run<List<BoxScore>>(() =>
base.Get<List<BoxScore>>("/nba/v2/{format}/BoxScoresDelta/{date}/{minutes}", parameters)
);
}
/// <summary>
/// Get Box Scores by Date Delta
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
/// <param name="minutes">Only returns player statistics that have changed in the last X minutes. You specify how many minutes in time to go back. Valid entries are: <code>1</code> or <code>2</code>.</param>
public List<BoxScore> GetBoxScoresDelta(string date, string minutes)
{
return this.GetBoxScoresDeltaAsync(date, minutes).Result;
}
/// <summary>
/// Get Current Season Asynchronous
/// </summary>
public Task<Season> GetCurrentSeasonAsync()
{
var parameters = new List<KeyValuePair<string, string>>();
return Task.Run<Season>(() =>
base.Get<Season>("/nba/v2/{format}/CurrentSeason", parameters)
);
}
/// <summary>
/// Get Current Season
/// </summary>
public Season GetCurrentSeason()
{
return this.GetCurrentSeasonAsync().Result;
}
/// <summary>
/// Get Games by Date Asynchronous
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public Task<List<Game>> GetGamesByDateAsync(string date)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("date", date.ToString()));
return Task.Run<List<Game>>(() =>
base.Get<List<Game>>("/nba/v2/{format}/GamesByDate/{date}", parameters)
);
}
/// <summary>
/// Get Games by Date
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public List<Game> GetGamesByDate(string date)
{
return this.GetGamesByDateAsync(date).Result;
}
/// <summary>
/// Get News Asynchronous
/// </summary>
public Task<List<News>> GetNewsAsync()
{
var parameters = new List<KeyValuePair<string, string>>();
return Task.Run<List<News>>(() =>
base.Get<List<News>>("/nba/v2/{format}/News", parameters)
);
}
/// <summary>
/// Get News
/// </summary>
public List<News> GetNews()
{
return this.GetNewsAsync().Result;
}
/// <summary>
/// Get News by Date Asynchronous
/// </summary>
/// <param name="date">The date of the news. Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public Task<List<News>> GetNewsByDateAsync(string date)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("date", date.ToString()));
return Task.Run<List<News>>(() =>
base.Get<List<News>>("/nba/v2/{format}/NewsByDate/{date}", parameters)
);
}
/// <summary>
/// Get News by Date
/// </summary>
/// <param name="date">The date of the news. Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public List<News> GetNewsByDate(string date)
{
return this.GetNewsByDateAsync(date).Result;
}
/// <summary>
/// Get News by Player Asynchronous
/// </summary>
/// <param name="playerid">Unique FantasyData Player ID. Example:<code>10000507</code>.</param>
public Task<List<News>> GetNewsByPlayerIDAsync(int playerid)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("playerid", playerid.ToString()));
return Task.Run<List<News>>(() =>
base.Get<List<News>>("/nba/v2/{format}/NewsByPlayerID/{playerid}", parameters)
);
}
/// <summary>
/// Get News by Player
/// </summary>
/// <param name="playerid">Unique FantasyData Player ID. Example:<code>10000507</code>.</param>
public List<News> GetNewsByPlayerID(int playerid)
{
return this.GetNewsByPlayerIDAsync(playerid).Result;
}
/// <summary>
/// Get Player Details by Active Asynchronous
/// </summary>
public Task<List<Player>> GetPlayersAsync()
{
var parameters = new List<KeyValuePair<string, string>>();
return Task.Run<List<Player>>(() =>
base.Get<List<Player>>("/nba/v2/{format}/Players", parameters)
);
}
/// <summary>
/// Get Player Details by Active
/// </summary>
public List<Player> GetPlayers()
{
return this.GetPlayersAsync().Result;
}
/// <summary>
/// Get Player Details by Free Agent Asynchronous
/// </summary>
public Task<List<Player>> GetFreeAgentsAsync()
{
var parameters = new List<KeyValuePair<string, string>>();
return Task.Run<List<Player>>(() =>
base.Get<List<Player>>("/nba/v2/{format}/FreeAgents", parameters)
);
}
/// <summary>
/// Get Player Details by Free Agent
/// </summary>
public List<Player> GetFreeAgents()
{
return this.GetFreeAgentsAsync().Result;
}
/// <summary>
/// Get Player Details by Player Asynchronous
/// </summary>
/// <param name="playerid">Unique FantasyData Player ID. Example:<code>20000571</code>.</param>
public Task<Player> GetPlayerAsync(int playerid)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("playerid", playerid.ToString()));
return Task.Run<Player>(() =>
base.Get<Player>("/nba/v2/{format}/Player/{playerid}", parameters)
);
}
/// <summary>
/// Get Player Details by Player
/// </summary>
/// <param name="playerid">Unique FantasyData Player ID. Example:<code>20000571</code>.</param>
public Player GetPlayer(int playerid)
{
return this.GetPlayerAsync(playerid).Result;
}
/// <summary>
/// Get Player Game Stats by Date Asynchronous
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public Task<List<PlayerGame>> GetPlayerGameStatsByDateAsync(string date)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("date", date.ToString()));
return Task.Run<List<PlayerGame>>(() =>
base.Get<List<PlayerGame>>("/nba/v2/{format}/PlayerGameStatsByDate/{date}", parameters)
);
}
/// <summary>
/// Get Player Game Stats by Date
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public List<PlayerGame> GetPlayerGameStatsByDate(string date)
{
return this.GetPlayerGameStatsByDateAsync(date).Result;
}
/// <summary>
/// Get Player Game Stats by Player Asynchronous
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
/// <param name="playerid">Unique FantasyData Player ID. Example:<code>20000571</code>.</param>
public Task<PlayerGame> GetPlayerGameStatsByPlayerAsync(string date, int playerid)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("date", date.ToString()));
parameters.Add(new KeyValuePair<string, string>("playerid", playerid.ToString()));
return Task.Run<PlayerGame>(() =>
base.Get<PlayerGame>("/nba/v2/{format}/PlayerGameStatsByPlayer/{date}/{playerid}", parameters)
);
}
/// <summary>
/// Get Player Game Stats by Player
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
/// <param name="playerid">Unique FantasyData Player ID. Example:<code>20000571</code>.</param>
public PlayerGame GetPlayerGameStatsByPlayer(string date, int playerid)
{
return this.GetPlayerGameStatsByPlayerAsync(date, playerid).Result;
}
/// <summary>
/// Get Player Season Stats Asynchronous
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
public Task<List<PlayerSeason>> GetPlayerSeasonStatsAsync(string season)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("season", season.ToString()));
return Task.Run<List<PlayerSeason>>(() =>
base.Get<List<PlayerSeason>>("/nba/v2/{format}/PlayerSeasonStats/{season}", parameters)
);
}
/// <summary>
/// Get Player Season Stats
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
public List<PlayerSeason> GetPlayerSeasonStats(string season)
{
return this.GetPlayerSeasonStatsAsync(season).Result;
}
/// <summary>
/// Get Player Season Stats By Player Asynchronous
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
/// <param name="playerid">Unique FantasyData Player ID. Example:<code>20000571</code>.</param>
public Task<PlayerSeason> GetPlayerSeasonStatsByPlayerAsync(string season, int playerid)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("season", season.ToString()));
parameters.Add(new KeyValuePair<string, string>("playerid", playerid.ToString()));
return Task.Run<PlayerSeason>(() =>
base.Get<PlayerSeason>("/nba/v2/{format}/PlayerSeasonStatsByPlayer/{season}/{playerid}", parameters)
);
}
/// <summary>
/// Get Player Season Stats By Player
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
/// <param name="playerid">Unique FantasyData Player ID. Example:<code>20000571</code>.</param>
public PlayerSeason GetPlayerSeasonStatsByPlayer(string season, int playerid)
{
return this.GetPlayerSeasonStatsByPlayerAsync(season, playerid).Result;
}
/// <summary>
/// Get Player Season Stats by Team Asynchronous
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
/// <param name="team">The abbreviation of the requested team. Examples: <code>SF</code>, <code>NYY</code>.</param>
public Task<List<PlayerSeason>> GetPlayerSeasonStatsByTeamAsync(string season, string team)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("season", season.ToString()));
parameters.Add(new KeyValuePair<string, string>("team", team.ToString()));
return Task.Run<List<PlayerSeason>>(() =>
base.Get<List<PlayerSeason>>("/nba/v2/{format}/PlayerSeasonStatsByTeam/{season}/{team}", parameters)
);
}
/// <summary>
/// Get Player Season Stats by Team
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
/// <param name="team">The abbreviation of the requested team. Examples: <code>SF</code>, <code>NYY</code>.</param>
public List<PlayerSeason> GetPlayerSeasonStatsByTeam(string season, string team)
{
return this.GetPlayerSeasonStatsByTeamAsync(season, team).Result;
}
/// <summary>
/// Get Players by Team Asynchronous
/// </summary>
/// <param name="team">The abbreviation of the requested team. Examples: <code>SF</code>, <code>NYY</code>.</param>
public Task<List<Player>> GetPlayersAsync(string team)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("team", team.ToString()));
return Task.Run<List<Player>>(() =>
base.Get<List<Player>>("/nba/v2/{format}/Players/{team}", parameters)
);
}
/// <summary>
/// Get Players by Team
/// </summary>
/// <param name="team">The abbreviation of the requested team. Examples: <code>SF</code>, <code>NYY</code>.</param>
public List<Player> GetPlayers(string team)
{
return this.GetPlayersAsync(team).Result;
}
/// <summary>
/// Get Projected Player Game Stats by Date (w/ Injuries, DFS Salaries) Asynchronous
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public Task<List<PlayerGameProjection>> GetPlayerGameProjectionStatsByDateAsync(string date)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("date", date.ToString()));
return Task.Run<List<PlayerGameProjection>>(() =>
base.Get<List<PlayerGameProjection>>("/nba/v2/{format}/PlayerGameProjectionStatsByDate/{date}", parameters)
);
}
/// <summary>
/// Get Projected Player Game Stats by Date (w/ Injuries, DFS Salaries)
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public List<PlayerGameProjection> GetPlayerGameProjectionStatsByDate(string date)
{
return this.GetPlayerGameProjectionStatsByDateAsync(date).Result;
}
/// <summary>
/// Get Projected Player Game Stats by Player (w/ Injuries, DFS Salaries) Asynchronous
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
/// <param name="playerid">Unique FantasyData Player ID. Example:<code>20000571</code>.</param>
public Task<PlayerGameProjection> GetPlayerGameProjectionStatsByPlayerAsync(string date, int playerid)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("date", date.ToString()));
parameters.Add(new KeyValuePair<string, string>("playerid", playerid.ToString()));
return Task.Run<PlayerGameProjection>(() =>
base.Get<PlayerGameProjection>("/nba/v2/{format}/PlayerGameProjectionStatsByPlayer/{date}/{playerid}", parameters)
);
}
/// <summary>
/// Get Projected Player Game Stats by Player (w/ Injuries, DFS Salaries)
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
/// <param name="playerid">Unique FantasyData Player ID. Example:<code>20000571</code>.</param>
public PlayerGameProjection GetPlayerGameProjectionStatsByPlayer(string date, int playerid)
{
return this.GetPlayerGameProjectionStatsByPlayerAsync(date, playerid).Result;
}
/// <summary>
/// Get Schedules Asynchronous
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
public Task<List<Game>> GetGamesAsync(string season)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("season", season.ToString()));
return Task.Run<List<Game>>(() =>
base.Get<List<Game>>("/nba/v2/{format}/Games/{season}", parameters)
);
}
/// <summary>
/// Get Schedules
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
public List<Game> GetGames(string season)
{
return this.GetGamesAsync(season).Result;
}
/// <summary>
/// Get Stadiums Asynchronous
/// </summary>
public Task<List<Stadium>> GetStadiumsAsync()
{
var parameters = new List<KeyValuePair<string, string>>();
return Task.Run<List<Stadium>>(() =>
base.Get<List<Stadium>>("/nba/v2/{format}/Stadiums", parameters)
);
}
/// <summary>
/// Get Stadiums
/// </summary>
public List<Stadium> GetStadiums()
{
return this.GetStadiumsAsync().Result;
}
/// <summary>
/// Get Standings Asynchronous
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
public Task<List<Standing>> GetStandingsAsync(string season)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("season", season.ToString()));
return Task.Run<List<Standing>>(() =>
base.Get<List<Standing>>("/nba/v2/{format}/Standings/{season}", parameters)
);
}
/// <summary>
/// Get Standings
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
public List<Standing> GetStandings(string season)
{
return this.GetStandingsAsync(season).Result;
}
/// <summary>
/// Get Team Game Stats by Date Asynchronous
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public Task<List<TeamGame>> GetTeamGameStatsByDateAsync(string date)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("date", date.ToString()));
return Task.Run<List<TeamGame>>(() =>
base.Get<List<TeamGame>>("/nba/v2/{format}/TeamGameStatsByDate/{date}", parameters)
);
}
/// <summary>
/// Get Team Game Stats by Date
/// </summary>
/// <param name="date">The date of the game(s). Examples: <code>2015-JUL-31</code>, <code>2015-SEP-01</code>.</param>
public List<TeamGame> GetTeamGameStatsByDate(string date)
{
return this.GetTeamGameStatsByDateAsync(date).Result;
}
/// <summary>
/// Get Team Season Stats Asynchronous
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
public Task<List<TeamSeason>> GetTeamSeasonStatsAsync(string season)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("season", season.ToString()));
return Task.Run<List<TeamSeason>>(() =>
base.Get<List<TeamSeason>>("/nba/v2/{format}/TeamSeasonStats/{season}", parameters)
);
}
/// <summary>
/// Get Team Season Stats
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
public List<TeamSeason> GetTeamSeasonStats(string season)
{
return this.GetTeamSeasonStatsAsync(season).Result;
}
/// <summary>
/// Get Team Stats Allowed by Position Asynchronous
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
public Task<List<TeamSeason>> GetTeamStatsAllowedByPositionAsync(string season)
{
var parameters = new List<KeyValuePair<string, string>>();
parameters.Add(new KeyValuePair<string, string>("season", season.ToString()));
return Task.Run<List<TeamSeason>>(() =>
base.Get<List<TeamSeason>>("/nba/v2/{format}/TeamStatsAllowedByPosition/{season}", parameters)
);
}
/// <summary>
/// Get Team Stats Allowed by Position
/// </summary>
/// <param name="season">Year of the season. Examples: <code>2015</code>, <code>2016</code>.</param>
public List<TeamSeason> GetTeamStatsAllowedByPosition(string season)
{
return this.GetTeamStatsAllowedByPositionAsync(season).Result;
}
/// <summary>
/// Get Teams (Active) Asynchronous
/// </summary>
public Task<List<Team>> GetTeamsAsync()
{
var parameters = new List<KeyValuePair<string, string>>();
return Task.Run<List<Team>>(() =>
base.Get<List<Team>>("/nba/v2/{format}/teams", parameters)
);
}
/// <summary>
/// Get Teams (Active)
/// </summary>
public List<Team> GetTeams()
{
return this.GetTeamsAsync().Result;
}
/// <summary>
/// Get Teams (All) Asynchronous
/// </summary>
public Task<List<Team>> GetAllTeamsAsync()
{
var parameters = new List<KeyValuePair<string, string>>();
return Task.Run<List<Team>>(() =>
base.Get<List<Team>>("/nba/v2/{format}/AllTeams", parameters)
);
}
/// <summary>
/// Get Teams (All)
/// </summary>
public List<Team> GetAllTeams()
{
return this.GetAllTeamsAsync().Result;
}
}
}
| 42.903692 | 215 | 0.575405 | [
"MIT"
] | scottspiller/fantasydata-api-csharp | FantasyData.Api.Client.NetCore/Clients/NBA/NBAv2.cs | 26,731 | C# |
using System;
using FluentAssertions;
using Machine.Specifications;
using Xunit;
namespace SecurityHeadersMiddleware.Tests {
public class CspAncestorSourceListTests {
private CspAncestorSourceList CreateSUT() {
return new CspAncestorSourceList();
}
[Fact]
public void When_adding_a_valid_host_source_it_should_succeed() {
var list = CreateSUT();
list.AddHost("http://*.example.com:80/path/");
}
[Fact]
public void When_adding_an_invalid_host_source_it_should_fail() {
var list = CreateSUT();
Assert.Throws<FormatException>(() => list.AddHost("holy crap this will fail!"));
}
[Fact]
public void When_adding_an_invalid_scheme_it_should_throw_a_formatException() {
var list = CreateSUT();
Assert.Throws<FormatException>(() => list.AddScheme("+invalid"));
}
[Fact]
public void When_adding_an_scheme_it_should_create_the_correct_value_for_the_header() {
var list = CreateSUT();
list.AddScheme("http");
list.ToDirectiveValue().Trim().ShouldEqual("http:");
}
[Fact]
public void When_adding_multiple_schemes_it_should_create_the_schemes_whiteSpace_separated() {
var list = CreateSUT();
list.AddScheme("http");
list.AddScheme("ftp");
list.AddScheme("https");
list.ToDirectiveValue().ShouldEqual("http: ftp: https:");
}
[Fact]
public void When_set_list_to_none_adding_a_scheme_should_throw_an_invalidOperationException() {
var list = CreateSUT();
list.SetToNone();
Assert.Throws<InvalidOperationException>(() => list.AddScheme("http"));
}
[Fact]
public void When_set_list_to_none_adding_a_host_should_throw_an_invalidOperationException() {
var list = CreateSUT();
list.SetToNone();
Assert.Throws<InvalidOperationException>(() => list.AddHost("http://www.example.com"));
}
[Fact]
public void When_set_list_to_none_it_should_create_header_value_with_none() {
var list = CreateSUT();
list.SetToNone();
list.ToDirectiveValue().ShouldEqual("'none'");
}
[Fact]
public void When_adding_one_scheme_multiple_times_it_should_only_be_once_in_the_header_value() {
var list = CreateSUT();
list.AddScheme("http:");
list.AddScheme("http");
list.ToDirectiveValue().Trim().ShouldEqual("http:");
}
[Fact]
public void When_adding_one_host_it_should_create_the_correct_header_value() {
var list = CreateSUT();
list.AddHost("http://*.example.com:*/path/file.js");
list.ToDirectiveValue().Trim().ShouldEqual("http://*.example.com:*/path/file.js");
}
[Fact]
public void When_adding_one_host_multiple_times_it_should_only_be_once_in_the_header_value() {
var sut = CreateSUT();
sut.AddHost("http://www.example.org");
sut.AddHost("http://www.example.org");
sut.ToDirectiveValue().Trim().Should().Be("http://www.example.org");
}
[Fact]
public void When_adding_an_http_host_with_and_without_default_values_they_should_be_treated_as_equal() {
var sut = CreateSUT();
sut.AddHost("http://www.example.org");
sut.AddHost("http://www.example.org:80");
sut.ToDirectiveValue().Trim().Should().Be("http://www.example.org");
}
[Fact]
public void When_adding_a_valid_uri_as_host_it_should_not_throw_a_exception() {
var list = CreateSUT();
list.AddHost(new Uri("https://www.example.com/abcd/"));
}
[Fact]
public void When_using_a_semicolon_in_a_value_it_should_be_escaped() {
var list = CreateSUT();
list.AddHost("http://example.com/abcd;/asdas");
list.ToDirectiveValue().Should().Be("http://example.com/abcd%3B/asdas");
}
[Fact]
public void When_using_a_comma_in_a_value_it_should_be_escaped() {
var list = CreateSUT();
list.AddHost("http://example.com/abcd,/asdas");
list.ToDirectiveValue().Should().Be("http://example.com/abcd%2C/asdas");
}
}
} | 37.512605 | 112 | 0.610663 | [
"MIT"
] | StefanOssendorf/SecurityHeadersMiddleware | src/OwinContrib.SecurityHeaders.Tests/CspAncestorSourceListTests.cs | 4,466 | C# |
using System;
namespace Zoth.BehaviourTree
{
public interface IBehaviourTreeNode<TTickData, TState>
{
string Name { get; }
ITickProfiler<TTickData> Profiler { get; set; }
Func<TTickData, TState, BehaviourTreeState> Compile();
}
}
| 19.285714 | 62 | 0.659259 | [
"MIT"
] | sad1y/Zoth.BehaviourTree | src/Zoth.BehaviourTree/IBehaviourTreeNode.cs | 272 | C# |
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Text.RegularExpressions;
using Microsoft.Recognizers.Definitions.Chinese;
namespace Microsoft.Recognizers.Text.DateTime.Chinese
{
public enum PeriodType
{
/// <summary>
/// Represents a ShortTime.
/// </summary>
ShortTime,
/// <summary>
/// Represents a FullTime.
/// </summary>
FullTime,
}
public class TimePeriodExtractorChs : BaseDateTimeExtractor<PeriodType>
{
public const string TimePeriodConnectWords = DateTimeDefinitions.TimePeriodTimePeriodConnectWords;
// 五点十分四十八秒
public static readonly string ChineseTimeRegex = TimeExtractorChs.ChineseTimeRegex;
// 六点 到 九点 | 六 到 九点
public static readonly string LeftChsTimeRegex = DateTimeDefinitions.TimePeriodLeftChsTimeRegex;
public static readonly string RightChsTimeRegex = DateTimeDefinitions.TimePeriodRightChsTimeRegex;
// 2:45
public static readonly string DigitTimeRegex = TimeExtractorChs.DigitTimeRegex;
public static readonly string LeftDigitTimeRegex = DateTimeDefinitions.TimePeriodLeftDigitTimeRegex;
public static readonly string RightDigitTimeRegex = DateTimeDefinitions.TimePeriodRightDigitTimeRegex;
public static readonly string ShortLeftChsTimeRegex = DateTimeDefinitions.TimePeriodShortLeftChsTimeRegex;
public static readonly string ShortLeftDigitTimeRegex = DateTimeDefinitions.TimePeriodShortLeftDigitTimeRegex;
public TimePeriodExtractorChs()
{
var regexes = new Dictionary<Regex, PeriodType>
{
{
new Regex(DateTimeDefinitions.TimePeriodRegexes1, RegexOptions.Singleline),
PeriodType.FullTime
},
{
new Regex(DateTimeDefinitions.TimePeriodRegexes2, RegexOptions.Singleline),
PeriodType.ShortTime
},
{
new Regex(DateTimeDefinitions.TimeOfDayRegex, RegexOptions.Singleline),
PeriodType.ShortTime
},
};
Regexes = regexes.ToImmutableDictionary();
}
internal sealed override ImmutableDictionary<Regex, PeriodType> Regexes { get; }
protected sealed override string ExtractType { get; } = Constants.SYS_DATETIME_TIMEPERIOD;
}
} | 36.442857 | 119 | 0.650333 | [
"MIT"
] | ParadoxARG/Recognizers-Text | .NET/Microsoft.Recognizers.Text.DateTime/Chinese/Extractors/TimePeriodExtractorChs.cs | 2,587 | C# |
using System;
using System.Linq;
using System.Collections.Generic;
namespace _03.SafeManipulation
{
class SafeManipulation
{
static void Main()
{
string[] input = Console.ReadLine().Split();
string text = Console.ReadLine();
while (text != "END")
{
string[] command = text.Split();
if (command[0] == "Reverse")
{
Array.Reverse(input);
}
else if (command[0] == "Distinct")
{
input = input.Distinct().ToArray();
}
else if (command[0] == "Replace")
{
var index = int.Parse(command[1]);
var word = command[2];
if (index >= 0 && index < input.Length)
{
input[index] = word;
}
else
{
Console.WriteLine("Invalid input!");
}
}
else
{
Console.WriteLine("Invalid input!");
}
text = Console.ReadLine();
}
Console.WriteLine(string.Join(", ", input));
}
}
}
| 27 | 60 | 0.371111 | [
"MIT"
] | paykova/TEST | ProgrammingFundamentals/ArraysAndMethodsMORE EX/03.SafeManipulation/SafeManipulation.cs | 1,352 | C# |
using System;
using System.Runtime.InteropServices;
namespace CSGL.GLFW {
public struct VideoMode {
public readonly int width;
public readonly int height;
public readonly int redBits;
public readonly int greenBits;
public readonly int blueBits;
public readonly int refreshRate;
}
public unsafe struct NativeGammaRamp {
public ushort* red;
public ushort* green;
public ushort* blue;
public uint size;
public NativeGammaRamp(ushort* red, ushort* green, ushort* blue, uint size) {
this.red = red;
this.green = green;
this.blue = blue;
this.size = size;
}
}
public unsafe struct NativeImage {
public int width;
public int height;
public byte* data;
public NativeImage(int width, int height, byte* data) {
this.width = width;
this.height = height;
this.data = data;
}
}
}
| 25.625 | 85 | 0.573659 | [
"MIT"
] | vazgriz/CSharpGameLibrary | CSharpGameLibrary/GLFW/structs.cs | 1,027 | C# |
using HousingRegisterApi.V1.Boundary.Request;
using HousingRegisterApi.V1.UseCase.Interfaces;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
namespace HousingRegisterApi.V1.Controllers
{
[ApiController]
[Route("api/v1/reporting")]
[Produces("application/json")]
[ApiVersion("1.0")]
public class ReportingApiController : BaseController
{
private readonly IListNovaletExportFilesUseCase _listNovaletExportFilesUseCase;
private readonly IGetNovaletExportUseCase _getNovaletExportUseCase;
private readonly ICreateNovaletExportUseCase _createNovaletExportUseCase;
private readonly IApproveNovaletExportUseCase _approveNovaletExportUseCase;
private readonly IGetInternalReportUseCase _getInternalReportUseCase;
public ReportingApiController(
IListNovaletExportFilesUseCase listNovaletExportFilesUseCase,
IGetNovaletExportUseCase getNovaletCsvUseCase,
ICreateNovaletExportUseCase createNovaletCsvUseCase,
IApproveNovaletExportUseCase approveNovaletExportUseCase,
IGetInternalReportUseCase getInternalReportUseCase)
{
_listNovaletExportFilesUseCase = listNovaletExportFilesUseCase;
_getNovaletExportUseCase = getNovaletCsvUseCase;
_createNovaletExportUseCase = createNovaletCsvUseCase;
_approveNovaletExportUseCase = approveNovaletExportUseCase;
_getInternalReportUseCase = getInternalReportUseCase;
}
/// <summary>
/// Returns the specified export file
/// </summary>
/// <response code="200">Success</response>
/// <response code="404">No file found for the specified filename</response>
/// <response code="500">Internal server error</response>
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
[HttpPost]
[Route("export")]
public async Task<IActionResult> DownloadReport([FromBody][Required] InternalReportRequest request)
{
var result = await _getInternalReportUseCase.Execute(request).ConfigureAwait(true);
if (result == null) return NotFound();
return File(result.Data, result.FileMimeType, result.FileName);
}
/// <summary>
/// Returns the Novalet export file
/// </summary>
/// <response code="200">Success</response>
/// <response code="500">Internal server error</response>
[ProducesResponseType(typeof(IList<string>), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
[HttpGet]
[Route("listnovaletfiles")]
public async Task<IActionResult> ViewNovaletExportFiles()
{
var result = await _listNovaletExportFilesUseCase.Execute().ConfigureAwait(false);
return Ok(result);
}
/// <summary>
/// Returns the Novalet export file
/// </summary>
/// <response code="200">Success</response>
/// <response code="404">No file found for the specified filename</response>
/// <response code="500">Internal server error</response>
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
[HttpGet]
[Route("novaletexport/{fileName}")]
public async Task<IActionResult> DownloadNovaletExport([FromRoute][Required] string fileName)
{
var result = await _getNovaletExportUseCase.Execute(fileName).ConfigureAwait(false);
if (result == null) return NotFound();
return File(result.Data, result.FileMimeType, result.FileName);
}
/// <summary>
/// Generates/Regenerates the Novalet export file
/// </summary>
/// <response code="200">Success</response>
/// <response code="404">Unable to generate export file</response>
/// <response code="500">Internal server error</response>
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
[HttpPost]
[Route("generatenovaletexport")]
public async Task<IActionResult> GenerateNovaletExport()
{
var result = await _createNovaletExportUseCase.Execute().ConfigureAwait(true);
if (result == null) return BadRequest();
return Ok();
}
/// <summary>
/// Approves the Novalet export file for transfer
/// </summary>
/// <response code="200">Success</response>
/// <response code="404">Unable to approve export file or file doesnt not exist</response>
/// <response code="500">Internal server error</response>
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
[HttpPost]
[Route("approvenovaletexport/{fileName}")]
public async Task<IActionResult> ApproveNovaletExport([FromRoute][Required] string fileName)
{
var result = await _approveNovaletExportUseCase.Execute(fileName).ConfigureAwait(false);
if (result == false) return BadRequest();
return Ok();
}
}
}
| 44.403101 | 107 | 0.681564 | [
"MIT"
] | LBHackney-IT/lbh-housing-api | HousingRegisterApi/V1/Controllers/ReportingApiController.cs | 5,728 | C# |
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.
// Ported from um/codecapi.h in the Windows SDK for Windows 10.0.22000.0
// Original source is Copyright © Microsoft. All rights reserved.
using System.Runtime.InteropServices;
namespace TerraFX.Interop.Windows;
/// <include file='CODECAPI_AVEncDDRFPreEmphasisFilter.xml' path='doc/member[@name="CODECAPI_AVEncDDRFPreEmphasisFilter"]/*' />
[Guid("21AF44C0-244E-4F3D-A2CC-3D3068B2E73F")]
public partial struct CODECAPI_AVEncDDRFPreEmphasisFilter
{
}
| 39.933333 | 145 | 0.792988 | [
"MIT"
] | reflectronic/terrafx.interop.windows | sources/Interop/Windows/Windows/um/codecapi/CODECAPI_AVEncDDRFPreEmphasisFilter.cs | 601 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
namespace WebbShop.Models
{
public class User
{
public int ID { get; set; }
public string Name { get; set; }
[DefaultValue("Codic2021")]
public string Password { get; set; }
public DateTime Lastlogin { get; set; }
public DateTime SessionTimer { get; set; }
[DefaultValue(true)]
public bool IsActive { get; set; }
[DefaultValue(false)]
public bool IsAdmin { get; set; }
}
}
| 22.68 | 50 | 0.608466 | [
"MIT"
] | marcusjobb/NET20D | OOPA/WebbshopProjekt/Mostafa/WebbShop/WebbShop/Models/User.cs | 569 | C# |
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis;
using NUnit.Framework;
using System.Collections.Immutable;
using System;
using System.Linq;
namespace PartiallyApplied.Tests
{
public static class PartiallyAppliedGeneratorTests
{
[Test]
public static void GenerateWhenGenericsExistForStandardMethod()
{
var (diagnostics, output) = PartiallyAppliedGeneratorTests.GetGeneratedOutput(
@"namespace MockTests
{
public static class Maths
{
public static void Combine<T>(int a, T b) { }
}
public static class Test
{
public static void Generate()
{
var combineWith3 = Partially.Apply(Maths.Combine, 3);
}
}
}");
Assert.Multiple(() =>
{
Assert.That(diagnostics.Length, Is.EqualTo(0));
Assert.That(output, Does.Contain("public static partial class Partially"));
Assert.That(output, Does.Contain($"{Naming.ApplyMethodName}<T>("));
});
}
[Test]
public static void GenerateWhenGenericsExistForNonStandardMethod()
{
var (diagnostics, output) = PartiallyAppliedGeneratorTests.GetGeneratedOutput(
@"namespace MockTests
{
public static class Maths
{
public static void Contains<T>(int value, Span<int> buffer, T value) { }
}
public static class Test
{
public static void Generate()
{
var combineWith3 = Partially.Apply(Maths.Contains, 3);
}
}
}");
Assert.Multiple(() =>
{
Assert.That(diagnostics.Length, Is.EqualTo(0));
Assert.That(output, Does.Contain("public static partial class Partially"));
Assert.That(output, Does.Contain($"{Naming.ApplyMethodName}<T>("));
});
}
[Test]
public static void GenerateUsingApplyRefReturn()
{
var (diagnostics, output) = PartiallyAppliedGeneratorTests.GetGeneratedOutput(
@"namespace MockTests
{
public static class Maths
{
private static int refReturn;
public static ref int Add(int a, int b)
{
Maths.refReturn = a + b + Maths.refReturn;
return ref Maths.refReturn;
}
}
public static class Test
{
public static void Generate()
{
var incrementBy3 = Partially.ApplyWithRefReturn(Maths.Add, 3);
}
}
}");
Assert.Multiple(() =>
{
Assert.That(diagnostics.Length, Is.EqualTo(0));
Assert.That(output, Does.Contain("public static partial class Partially"));
Assert.That(output, Does.Contain($"{Naming.ApplyMethodName}WithRefReturn("));
});
}
[Test]
public static void GenerateUsingApplyRefReadonlyReturn()
{
var (diagnostics, output) = PartiallyAppliedGeneratorTests.GetGeneratedOutput(
@"namespace MockTests
{
public static class Maths
{
private static int refReturn;
public static ref readonly int Add(int a, int b)
{
Maths.refReturn = a + b + Maths.refReturn;
return ref Maths.refReturn;
}
}
public static class Test
{
public static void Generate()
{
var incrementBy3 = Partially.ApplyWithRefReadonlyReturn(Maths.Add, 3);
}
}
}");
Assert.Multiple(() =>
{
Assert.That(diagnostics.Length, Is.EqualTo(0));
Assert.That(output, Does.Contain("public static partial class Partially"));
Assert.That(output, Does.Contain($"{Naming.ApplyMethodName}WithRefReadonlyReturn("));
});
}
[Test]
public static void GenerateWhenInvocationDoesNotExist()
{
var (diagnostics, output) = PartiallyAppliedGeneratorTests.GetGeneratedOutput(
@"namespace MockTests
{
public static class Maths
{
public static int Add(int a, int b) => a + b;
}
public static class Test
{
public static void Generate()
{
var incrementBy3 = Partially.Apply(Maths.Add, 3);
}
}
}");
Assert.Multiple(() =>
{
Assert.That(diagnostics.Length, Is.EqualTo(0));
Assert.That(output, Does.Contain("public static partial class Partially"));
Assert.That(output, Does.Contain($"{Naming.ApplyMethodName}("));
});
}
[Test]
public static void GenerateWhenInvocationExists()
{
var (diagnostics, output) = PartiallyAppliedGeneratorTests.GetGeneratedOutput(
@"using System;
namespace MockTests
{
public static class Maths
{
public static int Add(int a, int b) => a + b;
}
public static class Test
{
public static void Generate()
{
var incrementBy3 = Partially.Apply(Maths.Add, 3);
}
}
}
public static partial class Partially
{
public static Func<int, int> Apply(Func<int, int, int> method, int a) =>
new((b) => method(a, b));
}");
Assert.Multiple(() =>
{
Assert.That(diagnostics.Length, Is.EqualTo(0));
Assert.That(output, Does.Not.Contain("public static partial class Partially"));
Assert.That(output, Does.Not.Contain($"{Naming.ApplyMethodName}("));
});
}
[Test]
public static void GenerateWhenDuplicatesExist()
{
var (diagnostics, output) = PartiallyAppliedGeneratorTests.GetGeneratedOutput(
@"namespace MockTests
{
public static class Maths
{
public static int Add(int a, int b) => a + b;
public static int Multiply(int a, int b) => a * b;
}
public static class Test
{
public static void Generate()
{
var incrementBy3 = Partially.Apply(Maths.Add, 3);
var tripler = Partially.Apply(Maths.Multiply, 3);
}
}
}");
Assert.Multiple(() =>
{
Assert.That(diagnostics.Length, Is.EqualTo(0));
Assert.That(output, Does.Contain("public static partial class Partially"));
Assert.That(output, Does.Contain($"{Naming.ApplyMethodName}("));
});
}
private static (ImmutableArray<Diagnostic>, string) GetGeneratedOutput(string source, OutputKind outputKind = OutputKind.DynamicallyLinkedLibrary)
{
var syntaxTree = CSharpSyntaxTree.ParseText(source);
var references = AppDomain.CurrentDomain.GetAssemblies()
.Where(_ => !_.IsDynamic && !string.IsNullOrWhiteSpace(_.Location))
.Select(_ => MetadataReference.CreateFromFile(_.Location))
.Concat(new[] { MetadataReference.CreateFromFile(typeof(PartiallyAppliedGenerator).Assembly.Location) });
var compilation = CSharpCompilation.Create("apply", new SyntaxTree[] { syntaxTree },
references, new CSharpCompilationOptions(outputKind));
var originalTreeCount = compilation.SyntaxTrees.Length;
var generator = new PartiallyAppliedGenerator();
var driver = CSharpGeneratorDriver.Create(ImmutableArray.Create<ISourceGenerator>(generator));
driver.RunGeneratorsAndUpdateCompilation(compilation, out var outputCompilation, out var diagnostics);
var trees = outputCompilation.SyntaxTrees.ToList();
return (diagnostics, trees.Count != originalTreeCount ? trees[^1].ToString() : string.Empty);
}
}
} | 25.657371 | 148 | 0.710093 | [
"MIT"
] | JasonBock/PartiallyApplied | src/PartiallyApplied.Tests/PartiallyAppliedGeneratorTests.cs | 6,442 | C# |
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using NDesk.Options;
using Sep.Git.Tfs.Core;
using Sep.Git.Tfs.Core.TfsInterop;
using StructureMap;
namespace Sep.Git.Tfs.Commands
{
[Pluggable("branch")]
[Description("branch\n\n" +
" * Display inited remote TFS branches:\n git tfs branch\n\n" +
" * Display remote TFS branches:\n git tfs branch -r\n git tfs branch -r -all\n\n" +
" * Create a TFS branch from current commit:\n git tfs branch $/Repository/ProjectBranchToCreate <myWishedRemoteName> --comment=\"Creation of my branch\"\n\n" +
" * Rename a remote branch:\n git tfs branch --move oldTfsRemoteName newTfsRemoteName\n\n" +
" * Delete a remote branch:\n git tfs branch --delete tfsRemoteName\n\n" +
" * Initialise an existing remote TFS branch:\n git tfs branch --init $/Repository/ProjectBranch\n git tfs branch --init $/Repository/ProjectBranch myNewBranch\n git tfs branch --init --all\n git tfs branch --init --tfs-parent-branch=$/Repository/ProjectParentBranch $/Repository/ProjectBranch\n")]
[RequiresValidGitRepository]
public class Branch : GitTfsCommand
{
private readonly Globals _globals;
private readonly Help _helper;
private readonly Cleanup _cleanup;
private readonly InitBranch _initBranch;
private readonly Rcheckin _rcheckin;
public bool DisplayRemotes { get; set; }
public bool ManageAll { get; set; }
public bool ShouldRenameRemote { get; set; }
public bool ShouldDeleteRemote { get; set; }
public bool ShouldInitBranch { get; set; }
public string IgnoreRegex { get; set; }
public string ExceptRegex { get; set; }
public bool NoFetch { get; set; }
public string Comment { get; set; }
public string TfsUsername { get; set; }
public string TfsPassword { get; set; }
public string ParentBranch { get; set; }
public OptionSet OptionSet
{
get
{
return new OptionSet
{
{ "r|remotes", "Display the TFS branches of the current TFS root branch existing on the TFS server", v => DisplayRemotes = (v != null) },
{ "all", "Display (used with option --remotes) the TFS branches of all the root branches existing on the TFS server\n or Initialize (used with option --init) all existing TFS branches (For TFS 2010 and later)", v => ManageAll = (v != null) },
{ "comment=", "Comment used for the creation of the TFS branch ", v => Comment = v },
{ "m|move", "Rename a TFS remote", v => ShouldRenameRemote = (v != null) },
{ "delete", "Delete a TFS remote", v => ShouldDeleteRemote = (v != null) },
{ "init", "Initialize an existing TFS branch", v => ShouldInitBranch = (v != null) },
{ "ignore-regex=", "A regex of files to ignore", v => IgnoreRegex = v },
{ "except-regex=", "A regex of exceptions to ignore-regex", v => ExceptRegex = v},
{ "no-fetch", "Don't fetch changeset for newly initialized branch(es)", v => NoFetch = (v != null) },
{ "b|tfs-parent-branch=", "TFS Parent branch of the TFS branch to clone (TFS 2008 only! And required!!) ex: $/Repository/ProjectParentBranch", v => ParentBranch = v },
{ "u|username=", "TFS username", v => TfsUsername = v },
{ "p|password=", "TFS password", v => TfsPassword = v },
}
.Merge(_globals.OptionSet);
}
}
public Branch(Globals globals, Help helper, Cleanup cleanup, InitBranch initBranch, Rcheckin rcheckin)
{
_globals = globals;
_helper = helper;
_cleanup = cleanup;
_initBranch = initBranch;
_rcheckin = rcheckin;
}
public void SetInitBranchParameters()
{
_initBranch.TfsUsername = TfsUsername;
_initBranch.TfsPassword = TfsPassword;
_initBranch.CloneAllBranches = ManageAll;
_initBranch.ParentBranch = ParentBranch;
_initBranch.IgnoreRegex = IgnoreRegex;
_initBranch.ExceptRegex = ExceptRegex;
_initBranch.NoFetch = NoFetch;
}
public bool IsCommandWellUsed()
{
//Verify that some mutual exclusive options are not used together
return new[] { ShouldDeleteRemote, ShouldInitBranch, ShouldRenameRemote }.Count(b => b) <= 1;
}
public int Run()
{
if (!IsCommandWellUsed())
return _helper.Run(this);
_globals.WarnOnGitVersion();
VerifyCloneAllRepository();
if (ShouldRenameRemote || ShouldDeleteRemote)
return _helper.Run(this);
if (ShouldInitBranch)
{
SetInitBranchParameters();
return _initBranch.Run();
}
return DisplayBranchData();
}
public int Run(string param)
{
if (!IsCommandWellUsed())
return _helper.Run(this);
VerifyCloneAllRepository();
_globals.WarnOnGitVersion();
if (ShouldRenameRemote)
return _helper.Run(this);
if (ShouldInitBranch)
{
SetInitBranchParameters();
return _initBranch.Run(param);
}
if (ShouldDeleteRemote)
return DeleteRemote(param);
return CreateRemote(param);
}
public int Run(string param1, string param2)
{
if (!IsCommandWellUsed())
return _helper.Run(this);
VerifyCloneAllRepository();
_globals.WarnOnGitVersion();
if (ShouldDeleteRemote)
return _helper.Run(this);
if (ShouldInitBranch)
{
SetInitBranchParameters();
return _initBranch.Run(param1, param2);
}
if (ShouldRenameRemote)
return RenameRemote(param1, param2);
return CreateRemote(param1, param2);
}
private void VerifyCloneAllRepository()
{
if (!_globals.Repository.HasRemote(GitTfsConstants.DefaultRepositoryId))
return;
if (_globals.Repository.ReadTfsRemote(GitTfsConstants.DefaultRepositoryId).TfsRepositoryPath == GitTfsConstants.TfsRoot)
throw new GitTfsException("error: you can't use the 'branch' command when you have cloned the whole repository '$/' !");
}
private int RenameRemote(string oldRemoteName, string newRemoteName)
{
var newRemoteNameExpected = _globals.Repository.AssertValidBranchName(newRemoteName.ToGitRefName());
if (newRemoteNameExpected != newRemoteName)
Trace.TraceInformation("The name of the branch after renaming will be : " + newRemoteNameExpected);
if (_globals.Repository.HasRemote(newRemoteNameExpected))
{
throw new GitTfsException("error: this remote name is already used!");
}
Trace.TraceInformation("Cleaning before processing rename...");
_cleanup.Run();
_globals.Repository.MoveRemote(oldRemoteName, newRemoteNameExpected);
if (_globals.Repository.RenameBranch(oldRemoteName, newRemoteName) == null)
Trace.TraceWarning("warning: no local branch found to rename");
return GitTfsExitCodes.OK;
}
private int CreateRemote(string tfsPath, string gitBranchNameExpected = null)
{
bool checkInCurrentBranch = false;
tfsPath.AssertValidTfsPath();
Trace.WriteLine("Getting commit informations...");
var commit = _globals.Repository.GetCurrentTfsCommit();
if (commit == null)
{
checkInCurrentBranch = true;
var parents = _globals.Repository.GetLastParentTfsCommits(_globals.Repository.GetCurrentCommit());
if (!parents.Any())
throw new GitTfsException("error : no tfs remote parent found!");
commit = parents.First();
}
var remote = commit.Remote;
Trace.WriteLine("Creating branch in TFS...");
remote.Tfs.CreateBranch(remote.TfsRepositoryPath, tfsPath, commit.ChangesetId, Comment ?? "Creation branch " + tfsPath);
Trace.WriteLine("Init branch in local repository...");
_initBranch.DontCreateGitBranch = true;
var returnCode = _initBranch.Run(tfsPath, gitBranchNameExpected);
if (returnCode != GitTfsExitCodes.OK || !checkInCurrentBranch)
return returnCode;
_rcheckin.RebaseOnto(_initBranch.RemoteCreated.RemoteRef, commit.GitCommit);
_globals.UserSpecifiedRemoteId = _initBranch.RemoteCreated.Id;
return _rcheckin.Run();
}
private int DeleteRemote(string remoteName)
{
var remote = _globals.Repository.ReadTfsRemote(remoteName);
if (remote == null)
{
throw new GitTfsException(string.Format("Error: Remote \"{0}\" not found!", remoteName));
}
Trace.TraceInformation("Cleaning before processing delete...");
_cleanup.Run();
_globals.Repository.DeleteTfsRemote(remote);
return GitTfsExitCodes.OK;
}
public int DisplayBranchData()
{
// should probably pull this from options so that it is settable from the command-line
const string remoteId = GitTfsConstants.DefaultRepositoryId;
var tfsRemotes = _globals.Repository.ReadAllTfsRemotes();
if (DisplayRemotes)
{
if (!ManageAll)
{
var remote = _globals.Repository.ReadTfsRemote(remoteId);
Trace.TraceInformation("\nTFS branch structure:");
WriteRemoteTfsBranchStructure(remote.Tfs, remote.TfsRepositoryPath, tfsRemotes);
return GitTfsExitCodes.OK;
}
else
{
var remote = tfsRemotes.First(r => r.Id == remoteId);
if (!remote.Tfs.CanGetBranchInformation)
{
throw new GitTfsException("error: this version of TFS doesn't support this functionality");
}
foreach (var branch in remote.Tfs.GetBranches().Where(b => b.IsRoot))
{
var root = remote.Tfs.GetRootTfsBranchForRemotePath(branch.Path);
var visitor = new WriteBranchStructureTreeVisitor(remote.TfsRepositoryPath, tfsRemotes);
root.AcceptVisitor(visitor);
}
return GitTfsExitCodes.OK;
}
}
WriteTfsRemoteDetails(tfsRemotes);
return GitTfsExitCodes.OK;
}
public static void WriteRemoteTfsBranchStructure(ITfsHelper tfsHelper, string tfsRepositoryPath, IEnumerable<IGitTfsRemote> tfsRemotes = null)
{
var root = tfsHelper.GetRootTfsBranchForRemotePath(tfsRepositoryPath);
if (!tfsHelper.CanGetBranchInformation)
{
throw new GitTfsException("error: this version of TFS doesn't support this functionality");
}
var visitor = new WriteBranchStructureTreeVisitor(tfsRepositoryPath, tfsRemotes);
root.AcceptVisitor(visitor);
}
private void WriteTfsRemoteDetails(IEnumerable<IGitTfsRemote> tfsRemotes)
{
Trace.TraceInformation("\nGit-tfs remote details:");
foreach (var remote in tfsRemotes)
{
Trace.TraceInformation("\n {0} -> {1} {2}", remote.Id, remote.TfsUrl, remote.TfsRepositoryPath);
Trace.TraceInformation(" {0} - {1} @ {2}", remote.RemoteRef, remote.MaxCommitHash, remote.MaxChangesetId);
}
}
private class WriteBranchStructureTreeVisitor : IBranchTreeVisitor
{
private readonly string _targetPath;
private readonly IEnumerable<IGitTfsRemote> _tfsRemotes;
public WriteBranchStructureTreeVisitor(string targetPath, IEnumerable<IGitTfsRemote> tfsRemotes = null)
{
_targetPath = targetPath;
_tfsRemotes = tfsRemotes;
}
public void Visit(BranchTree branch, int level)
{
var writer = new StringWriter();
for (var i = 0; i < level; i++)
writer.Write(" | ");
writer.WriteLine();
for (var i = 0; i < level - 1; i++)
writer.Write(" | ");
if (level > 0)
writer.Write(" +-");
writer.Write(" {0}", branch.Path);
if (_tfsRemotes != null)
{
var remote = _tfsRemotes.FirstOrDefault(r => r.TfsRepositoryPath == branch.Path);
if (remote != null)
writer.Write(" -> " + remote.Id);
}
if (branch.Path.Equals(_targetPath))
writer.Write(" [*]");
Trace.TraceInformation(writer.ToString());
}
}
}
}
| 41.333333 | 336 | 0.571213 | [
"Apache-2.0"
] | visaodeempresa/git-tfs | GitTfs/Commands/Branch.cs | 13,888 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Foodie1.Data;
using Foodie1.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Foodie1.Controllers
{
public class AdministratorController : Controller
{
[Authorize(Roles = "Administrator")]
public IActionResult ControlPanel()
{
try {
var db = new FoodieContext();
return View(db.Restaurants.ToList());
}
catch (global::System.Exception)
{
return RedirectToAction("Internal", "Error");
}
}
[Authorize(Roles = "Administrator")]
public IActionResult SeeUser(int id)
{
try {
var db = new FoodieContext();
return View(db.Restaurants.FirstOrDefault(x=>x.Id==id));
}
catch (global::System.Exception)
{
return RedirectToAction("Internal", "Error");
}
}
[Authorize(Roles = "Administrator")]
public IActionResult EditUser(Restaurant model)
{
try
{
var db = new FoodieContext();
var res = db.Restaurants.FirstOrDefault(x => x.Id == model.Id);
res.Name = model.Name;
res.Phone = model.Phone;
res.Address.Street = model.Address.Street;
res.Address.Town.Name = model.Address.Town.Name;
res.Address.Town.PostalCode = model.Address.Town.PostalCode;
res.AdditionalInformation = model.AdditionalInformation;
db.Restaurants.Update(res);
db.SaveChanges();
return RedirectToAction("ControlPanel");
}
catch (global::System.Exception)
{
return RedirectToAction("Internal", "Error");
}
}
}
} | 31.571429 | 79 | 0.542986 | [
"MIT"
] | AdemTsranchaliev/FoodieNOIT | Controllers/AdministratorController.cs | 1,991 | C# |
using System;
using System.Reflection;
using CSF.Validation.RuleExecution;
using Microsoft.Extensions.DependencyInjection;
namespace CSF.Validation.Manifest
{
/// <summary>
/// A factory service which gets a validator from a validation manifest.
/// </summary>
public class ValidatorFromManifestFactory : IGetsValidatorFromManifest
{
readonly IServiceProvider resolver;
/// <summary>
/// Gets a validator from a validation manifest.
/// </summary>
/// <param name="manifest">The validation manifest.</param>
/// <returns>A validator.</returns>
public IValidator GetValidator(ValidationManifest manifest)
{
if (manifest is null)
throw new ArgumentNullException(nameof(manifest));
var method = GetType().GetTypeInfo().GetDeclaredMethod(nameof(GetValidatorPrivate)).MakeGenericMethod(manifest.ValidatedType);
return (IValidator) method.Invoke(this, new [] { manifest });
}
IValidator<TValidated> GetValidatorPrivate<TValidated>(ValidationManifest manifest)
{
return new Validator<TValidated>(manifest,
resolver.GetRequiredService<IGetsRuleExecutor>(),
resolver.GetRequiredService<IGetsAllExecutableRulesWithDependencies>());
}
/// <summary>
/// Initialises a new instance of <see cref="ValidatorFromManifestFactory"/>.
/// </summary>
/// <param name="resolver">A DI resolver.</param>
/// <exception cref="ArgumentNullException">If <paramref name="resolver"/> is <see langword="null" />.</exception>
public ValidatorFromManifestFactory(IServiceProvider resolver)
{
this.resolver = resolver ?? throw new ArgumentNullException(nameof(resolver));
}
}
} | 41.304348 | 138 | 0.638947 | [
"MIT"
] | csf-dev/CSF.Validation | CSF.Validation/Manifest/ValidatorFromManifestFactory.cs | 1,900 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
using NMF.Collections.Generic;
using NMF.Collections.ObjectModel;
using NMF.Expressions;
using NMF.Expressions.Linq;
using NMF.Models;
using NMF.Models.Collections;
using NMF.Models.Expressions;
using NMF.Models.Meta;
using NMF.Models.Repository;
using NMF.Serialization;
using NMF.Utilities;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using TTC2017.SmartGrids.CIM.IEC61968.AssetModels;
using TTC2017.SmartGrids.CIM.IEC61968.Assets;
using TTC2017.SmartGrids.CIM.IEC61968.Common;
using TTC2017.SmartGrids.CIM.IEC61968.Metering;
using TTC2017.SmartGrids.CIM.IEC61968.WiresExt;
using TTC2017.SmartGrids.CIM.IEC61970.Core;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.InfAssetModels;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.InfCommon;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.InfERPSupport;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.InfOperations;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.InfTypeAsset;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.InfWork;
using TTC2017.SmartGrids.CIM.IEC61970.Meas;
using TTC2017.SmartGrids.CIM.IEC61970.Wires;
namespace TTC2017.SmartGrids.CIM.IEC61970.Informative.InfAssets
{
/// <summary>
/// The default implementation of the OrgAssetRole class
/// </summary>
[XmlNamespaceAttribute("http://iec.ch/TC57/2009/CIM-schema-cim14#InfAssets")]
[XmlNamespacePrefixAttribute("cimInfAssets")]
[ModelRepresentationClassAttribute("http://iec.ch/TC57/2009/CIM-schema-cim14#//IEC61970/Informative/InfAssets/OrgAsse" +
"tRole")]
[DebuggerDisplayAttribute("OrgAssetRole {UUID}")]
public partial class OrgAssetRole : Role, IOrgAssetRole, IModelElement
{
/// <summary>
/// The backing field for the PercentOwnership property
/// </summary>
private float _percentOwnership;
private static Lazy<ITypedElement> _percentOwnershipAttribute = new Lazy<ITypedElement>(RetrievePercentOwnershipAttribute);
private static Lazy<ITypedElement> _erpOrganisationReference = new Lazy<ITypedElement>(RetrieveErpOrganisationReference);
/// <summary>
/// The backing field for the ErpOrganisation property
/// </summary>
private IErpOrganisation _erpOrganisation;
private static Lazy<ITypedElement> _assetReference = new Lazy<ITypedElement>(RetrieveAssetReference);
/// <summary>
/// The backing field for the Asset property
/// </summary>
private IAsset _asset;
private static IClass _classInstance;
/// <summary>
/// The percentOwnership property
/// </summary>
[XmlElementNameAttribute("percentOwnership")]
[XmlAttributeAttribute(true)]
public virtual float PercentOwnership
{
get
{
return this._percentOwnership;
}
set
{
if ((this._percentOwnership != value))
{
float old = this._percentOwnership;
ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
this.OnPercentOwnershipChanging(e);
this.OnPropertyChanging("PercentOwnership", e, _percentOwnershipAttribute);
this._percentOwnership = value;
this.OnPercentOwnershipChanged(e);
this.OnPropertyChanged("PercentOwnership", e, _percentOwnershipAttribute);
}
}
}
/// <summary>
/// The ErpOrganisation property
/// </summary>
[XmlAttributeAttribute(true)]
[XmlOppositeAttribute("AssetRoles")]
public virtual IErpOrganisation ErpOrganisation
{
get
{
return this._erpOrganisation;
}
set
{
if ((this._erpOrganisation != value))
{
IErpOrganisation old = this._erpOrganisation;
ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
this.OnErpOrganisationChanging(e);
this.OnPropertyChanging("ErpOrganisation", e, _erpOrganisationReference);
this._erpOrganisation = value;
if ((old != null))
{
old.AssetRoles.Remove(this);
old.Deleted -= this.OnResetErpOrganisation;
}
if ((value != null))
{
value.AssetRoles.Add(this);
value.Deleted += this.OnResetErpOrganisation;
}
this.OnErpOrganisationChanged(e);
this.OnPropertyChanged("ErpOrganisation", e, _erpOrganisationReference);
}
}
}
/// <summary>
/// The Asset property
/// </summary>
[XmlAttributeAttribute(true)]
[XmlOppositeAttribute("ErpOrganisationRoles")]
public virtual IAsset Asset
{
get
{
return this._asset;
}
set
{
if ((this._asset != value))
{
IAsset old = this._asset;
ValueChangedEventArgs e = new ValueChangedEventArgs(old, value);
this.OnAssetChanging(e);
this.OnPropertyChanging("Asset", e, _assetReference);
this._asset = value;
if ((old != null))
{
old.ErpOrganisationRoles.Remove(this);
old.Deleted -= this.OnResetAsset;
}
if ((value != null))
{
value.ErpOrganisationRoles.Add(this);
value.Deleted += this.OnResetAsset;
}
this.OnAssetChanged(e);
this.OnPropertyChanged("Asset", e, _assetReference);
}
}
}
/// <summary>
/// Gets the referenced model elements of this model element
/// </summary>
public override IEnumerableExpression<IModelElement> ReferencedElements
{
get
{
return base.ReferencedElements.Concat(new OrgAssetRoleReferencedElementsCollection(this));
}
}
/// <summary>
/// Gets the Class model for this type
/// </summary>
public new static IClass ClassInstance
{
get
{
if ((_classInstance == null))
{
_classInstance = ((IClass)(MetaRepository.Instance.Resolve("http://iec.ch/TC57/2009/CIM-schema-cim14#//IEC61970/Informative/InfAssets/OrgAsse" +
"tRole")));
}
return _classInstance;
}
}
/// <summary>
/// Gets fired before the PercentOwnership property changes its value
/// </summary>
public event System.EventHandler<ValueChangedEventArgs> PercentOwnershipChanging;
/// <summary>
/// Gets fired when the PercentOwnership property changed its value
/// </summary>
public event System.EventHandler<ValueChangedEventArgs> PercentOwnershipChanged;
/// <summary>
/// Gets fired before the ErpOrganisation property changes its value
/// </summary>
public event System.EventHandler<ValueChangedEventArgs> ErpOrganisationChanging;
/// <summary>
/// Gets fired when the ErpOrganisation property changed its value
/// </summary>
public event System.EventHandler<ValueChangedEventArgs> ErpOrganisationChanged;
/// <summary>
/// Gets fired before the Asset property changes its value
/// </summary>
public event System.EventHandler<ValueChangedEventArgs> AssetChanging;
/// <summary>
/// Gets fired when the Asset property changed its value
/// </summary>
public event System.EventHandler<ValueChangedEventArgs> AssetChanged;
private static ITypedElement RetrievePercentOwnershipAttribute()
{
return ((ITypedElement)(((ModelElement)(OrgAssetRole.ClassInstance)).Resolve("percentOwnership")));
}
/// <summary>
/// Raises the PercentOwnershipChanging event
/// </summary>
/// <param name="eventArgs">The event data</param>
protected virtual void OnPercentOwnershipChanging(ValueChangedEventArgs eventArgs)
{
System.EventHandler<ValueChangedEventArgs> handler = this.PercentOwnershipChanging;
if ((handler != null))
{
handler.Invoke(this, eventArgs);
}
}
/// <summary>
/// Raises the PercentOwnershipChanged event
/// </summary>
/// <param name="eventArgs">The event data</param>
protected virtual void OnPercentOwnershipChanged(ValueChangedEventArgs eventArgs)
{
System.EventHandler<ValueChangedEventArgs> handler = this.PercentOwnershipChanged;
if ((handler != null))
{
handler.Invoke(this, eventArgs);
}
}
private static ITypedElement RetrieveErpOrganisationReference()
{
return ((ITypedElement)(((ModelElement)(OrgAssetRole.ClassInstance)).Resolve("ErpOrganisation")));
}
/// <summary>
/// Raises the ErpOrganisationChanging event
/// </summary>
/// <param name="eventArgs">The event data</param>
protected virtual void OnErpOrganisationChanging(ValueChangedEventArgs eventArgs)
{
System.EventHandler<ValueChangedEventArgs> handler = this.ErpOrganisationChanging;
if ((handler != null))
{
handler.Invoke(this, eventArgs);
}
}
/// <summary>
/// Raises the ErpOrganisationChanged event
/// </summary>
/// <param name="eventArgs">The event data</param>
protected virtual void OnErpOrganisationChanged(ValueChangedEventArgs eventArgs)
{
System.EventHandler<ValueChangedEventArgs> handler = this.ErpOrganisationChanged;
if ((handler != null))
{
handler.Invoke(this, eventArgs);
}
}
/// <summary>
/// Handles the event that the ErpOrganisation property must reset
/// </summary>
/// <param name="sender">The object that sent this reset request</param>
/// <param name="eventArgs">The event data for the reset event</param>
private void OnResetErpOrganisation(object sender, System.EventArgs eventArgs)
{
this.ErpOrganisation = null;
}
private static ITypedElement RetrieveAssetReference()
{
return ((ITypedElement)(((ModelElement)(OrgAssetRole.ClassInstance)).Resolve("Asset")));
}
/// <summary>
/// Raises the AssetChanging event
/// </summary>
/// <param name="eventArgs">The event data</param>
protected virtual void OnAssetChanging(ValueChangedEventArgs eventArgs)
{
System.EventHandler<ValueChangedEventArgs> handler = this.AssetChanging;
if ((handler != null))
{
handler.Invoke(this, eventArgs);
}
}
/// <summary>
/// Raises the AssetChanged event
/// </summary>
/// <param name="eventArgs">The event data</param>
protected virtual void OnAssetChanged(ValueChangedEventArgs eventArgs)
{
System.EventHandler<ValueChangedEventArgs> handler = this.AssetChanged;
if ((handler != null))
{
handler.Invoke(this, eventArgs);
}
}
/// <summary>
/// Handles the event that the Asset property must reset
/// </summary>
/// <param name="sender">The object that sent this reset request</param>
/// <param name="eventArgs">The event data for the reset event</param>
private void OnResetAsset(object sender, System.EventArgs eventArgs)
{
this.Asset = null;
}
/// <summary>
/// Resolves the given attribute name
/// </summary>
/// <returns>The attribute value or null if it could not be found</returns>
/// <param name="attribute">The requested attribute name</param>
/// <param name="index">The index of this attribute</param>
protected override object GetAttributeValue(string attribute, int index)
{
if ((attribute == "PERCENTOWNERSHIP"))
{
return this.PercentOwnership;
}
return base.GetAttributeValue(attribute, index);
}
/// <summary>
/// Sets a value to the given feature
/// </summary>
/// <param name="feature">The requested feature</param>
/// <param name="value">The value that should be set to that feature</param>
protected override void SetFeature(string feature, object value)
{
if ((feature == "ERPORGANISATION"))
{
this.ErpOrganisation = ((IErpOrganisation)(value));
return;
}
if ((feature == "ASSET"))
{
this.Asset = ((IAsset)(value));
return;
}
if ((feature == "PERCENTOWNERSHIP"))
{
this.PercentOwnership = ((float)(value));
return;
}
base.SetFeature(feature, value);
}
/// <summary>
/// Gets the property expression for the given attribute
/// </summary>
/// <returns>An incremental property expression</returns>
/// <param name="attribute">The requested attribute in upper case</param>
protected override NMF.Expressions.INotifyExpression<object> GetExpressionForAttribute(string attribute)
{
if ((attribute == "ErpOrganisation"))
{
return new ErpOrganisationProxy(this);
}
if ((attribute == "Asset"))
{
return new AssetProxy(this);
}
return base.GetExpressionForAttribute(attribute);
}
/// <summary>
/// Gets the property expression for the given reference
/// </summary>
/// <returns>An incremental property expression</returns>
/// <param name="reference">The requested reference in upper case</param>
protected override NMF.Expressions.INotifyExpression<NMF.Models.IModelElement> GetExpressionForReference(string reference)
{
if ((reference == "ErpOrganisation"))
{
return new ErpOrganisationProxy(this);
}
if ((reference == "Asset"))
{
return new AssetProxy(this);
}
return base.GetExpressionForReference(reference);
}
/// <summary>
/// Gets the Class for this model element
/// </summary>
public override IClass GetClass()
{
if ((_classInstance == null))
{
_classInstance = ((IClass)(MetaRepository.Instance.Resolve("http://iec.ch/TC57/2009/CIM-schema-cim14#//IEC61970/Informative/InfAssets/OrgAsse" +
"tRole")));
}
return _classInstance;
}
/// <summary>
/// The collection class to to represent the children of the OrgAssetRole class
/// </summary>
public class OrgAssetRoleReferencedElementsCollection : ReferenceCollection, ICollectionExpression<IModelElement>, ICollection<IModelElement>
{
private OrgAssetRole _parent;
/// <summary>
/// Creates a new instance
/// </summary>
public OrgAssetRoleReferencedElementsCollection(OrgAssetRole parent)
{
this._parent = parent;
}
/// <summary>
/// Gets the amount of elements contained in this collection
/// </summary>
public override int Count
{
get
{
int count = 0;
if ((this._parent.ErpOrganisation != null))
{
count = (count + 1);
}
if ((this._parent.Asset != null))
{
count = (count + 1);
}
return count;
}
}
protected override void AttachCore()
{
this._parent.ErpOrganisationChanged += this.PropagateValueChanges;
this._parent.AssetChanged += this.PropagateValueChanges;
}
protected override void DetachCore()
{
this._parent.ErpOrganisationChanged -= this.PropagateValueChanges;
this._parent.AssetChanged -= this.PropagateValueChanges;
}
/// <summary>
/// Adds the given element to the collection
/// </summary>
/// <param name="item">The item to add</param>
public override void Add(IModelElement item)
{
if ((this._parent.ErpOrganisation == null))
{
IErpOrganisation erpOrganisationCasted = item.As<IErpOrganisation>();
if ((erpOrganisationCasted != null))
{
this._parent.ErpOrganisation = erpOrganisationCasted;
return;
}
}
if ((this._parent.Asset == null))
{
IAsset assetCasted = item.As<IAsset>();
if ((assetCasted != null))
{
this._parent.Asset = assetCasted;
return;
}
}
}
/// <summary>
/// Clears the collection and resets all references that implement it.
/// </summary>
public override void Clear()
{
this._parent.ErpOrganisation = null;
this._parent.Asset = null;
}
/// <summary>
/// Gets a value indicating whether the given element is contained in the collection
/// </summary>
/// <returns>True, if it is contained, otherwise False</returns>
/// <param name="item">The item that should be looked out for</param>
public override bool Contains(IModelElement item)
{
if ((item == this._parent.ErpOrganisation))
{
return true;
}
if ((item == this._parent.Asset))
{
return true;
}
return false;
}
/// <summary>
/// Copies the contents of the collection to the given array starting from the given array index
/// </summary>
/// <param name="array">The array in which the elements should be copied</param>
/// <param name="arrayIndex">The starting index</param>
public override void CopyTo(IModelElement[] array, int arrayIndex)
{
if ((this._parent.ErpOrganisation != null))
{
array[arrayIndex] = this._parent.ErpOrganisation;
arrayIndex = (arrayIndex + 1);
}
if ((this._parent.Asset != null))
{
array[arrayIndex] = this._parent.Asset;
arrayIndex = (arrayIndex + 1);
}
}
/// <summary>
/// Removes the given item from the collection
/// </summary>
/// <returns>True, if the item was removed, otherwise False</returns>
/// <param name="item">The item that should be removed</param>
public override bool Remove(IModelElement item)
{
if ((this._parent.ErpOrganisation == item))
{
this._parent.ErpOrganisation = null;
return true;
}
if ((this._parent.Asset == item))
{
this._parent.Asset = null;
return true;
}
return false;
}
/// <summary>
/// Gets an enumerator that enumerates the collection
/// </summary>
/// <returns>A generic enumerator</returns>
public override IEnumerator<IModelElement> GetEnumerator()
{
return Enumerable.Empty<IModelElement>().Concat(this._parent.ErpOrganisation).Concat(this._parent.Asset).GetEnumerator();
}
}
/// <summary>
/// Represents a proxy to represent an incremental access to the percentOwnership property
/// </summary>
private sealed class PercentOwnershipProxy : ModelPropertyChange<IOrgAssetRole, float>
{
/// <summary>
/// Creates a new observable property access proxy
/// </summary>
/// <param name="modelElement">The model instance element for which to create the property access proxy</param>
public PercentOwnershipProxy(IOrgAssetRole modelElement) :
base(modelElement, "percentOwnership")
{
}
/// <summary>
/// Gets or sets the value of this expression
/// </summary>
public override float Value
{
get
{
return this.ModelElement.PercentOwnership;
}
set
{
this.ModelElement.PercentOwnership = value;
}
}
}
/// <summary>
/// Represents a proxy to represent an incremental access to the ErpOrganisation property
/// </summary>
private sealed class ErpOrganisationProxy : ModelPropertyChange<IOrgAssetRole, IErpOrganisation>
{
/// <summary>
/// Creates a new observable property access proxy
/// </summary>
/// <param name="modelElement">The model instance element for which to create the property access proxy</param>
public ErpOrganisationProxy(IOrgAssetRole modelElement) :
base(modelElement, "ErpOrganisation")
{
}
/// <summary>
/// Gets or sets the value of this expression
/// </summary>
public override IErpOrganisation Value
{
get
{
return this.ModelElement.ErpOrganisation;
}
set
{
this.ModelElement.ErpOrganisation = value;
}
}
}
/// <summary>
/// Represents a proxy to represent an incremental access to the Asset property
/// </summary>
private sealed class AssetProxy : ModelPropertyChange<IOrgAssetRole, IAsset>
{
/// <summary>
/// Creates a new observable property access proxy
/// </summary>
/// <param name="modelElement">The model instance element for which to create the property access proxy</param>
public AssetProxy(IOrgAssetRole modelElement) :
base(modelElement, "Asset")
{
}
/// <summary>
/// Gets or sets the value of this expression
/// </summary>
public override IAsset Value
{
get
{
return this.ModelElement.Asset;
}
set
{
this.ModelElement.Asset = value;
}
}
}
}
}
| 37.570175 | 164 | 0.528874 | [
"MIT"
] | georghinkel/ttc2017smartGrids | generator/Schema/IEC61970/Informative/InfAssets/OrgAssetRole.cs | 25,700 | C# |
// <auto-generated />
namespace IronJS.Tests.UnitTests.Sputnik.Conformance.NativeECMAScriptObjects.NumberObjects
{
using System;
using NUnit.Framework;
[TestFixture]
public class TheNumberConstructorTests : SputnikTestFixture
{
public TheNumberConstructorTests()
: base(@"Conformance\15_Native_ECMA_Script_Objects\15.7_Number_Objects\15.7.2_The_Number_Constructor")
{
}
[Test]
[Category("Sputnik Conformance")]
[Category("ECMA 15.7.2.1")]
[TestCase("S15.7.2.1_A1.js", Description = "When Number is called as part of a new expression it is a constructor: it initialises the newly created object")]
public void WhenNumberIsCalledAsPartOfANewExpressionItIsAConstructorItInitialisesTheNewlyCreatedObject(string file)
{
RunFile(file);
}
[Test]
[Category("Sputnik Conformance")]
[Category("ECMA 15.7.2.1")]
[TestCase("S15.7.2.1_A2.js", Description = "The [[Prototype]] property of the newly constructed object is set to the original Number prototype object, the one that is the initial value of Number.prototype")]
public void ThePrototypePropertyOfTheNewlyConstructedObjectIsSetToTheOriginalNumberPrototypeObjectTheOneThatIsTheInitialValueOfNumberPrototype(string file)
{
RunFile(file);
}
[Test]
[Category("Sputnik Conformance")]
[Category("ECMA 15.7.2.1")]
[TestCase("S15.7.2.1_A3.js", Description = "The [[Value]] property of the newly constructed object is set to ToNumber(value) if value was supplied, else to +0")]
public void TheValuePropertyOfTheNewlyConstructedObjectIsSetToToNumberValueIfValueWasSuppliedElseTo0(string file)
{
RunFile(file);
}
[Test]
[Category("Sputnik Conformance")]
[Category("ECMA 15.7.2.1")]
[TestCase("S15.7.2.1_A4.js", Description = "The [[Class]] property of the newly constructed object is set to \"Number\"")]
public void TheClassPropertyOfTheNewlyConstructedObjectIsSetToNumber(string file)
{
RunFile(file);
}
}
} | 42.764706 | 215 | 0.674461 | [
"Apache-2.0"
] | Varshit07/IronJS | Src/Tests/UnitTests/Sputnik/Conformance/NativeECMAScriptObjects/NumberObjects/TheNumberConstructorTests.cs | 2,181 | C# |
using System.Diagnostics.CodeAnalysis;
using AuthMe.IdentityMsrv.Application.Common.Interfaces;
using AuthMe.IdentityMsrv.Application.Identities.Commands.DeleteIdentity;
using AuthMe.IdentityMsrv.Application.Identities.Commands.UpdateIdentity;
using FluentValidation;
namespace AuthMe.IdentityMsrv.Application.Identities.Commands.UpdateIdentityTrusted;
[SuppressMessage("ReSharper", "UnusedType.Global")]
public class UpdateIdentityTrustedCommandValidator : AbstractValidator<UpdateIdentityTrustedCommand>
{
public UpdateIdentityTrustedCommandValidator(IIdentityRepository repository)
{
RuleFor(identity => identity.Id)
.MustAsync(async (id,_) => await repository.IdentityExistsAsync(id))
.WithErrorCode("NotFound")
.WithMessage("Identity with the given id does not exist in the database.");
}
} | 44.947368 | 100 | 0.791569 | [
"MIT"
] | R46narok/AuthMe | src/dotnet/AuthMe.Identity/AuthMe.Identity.Application/Identities/Commands/UpdateIdentityTrusted/UpdateIdentityTrustedCommandValidator.cs | 856 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using Silk.NET.Core.Attributes;
#pragma warning disable 1591
namespace Silk.NET.Direct3D11
{
[Flags]
[NativeName("Name", "D3D11_SHADER_MIN_PRECISION_SUPPORT")]
public enum ShaderMinPrecisionSupport : int
{
[NativeName("Name", "")]
None = 0,
[NativeName("Name", "D3D11_SHADER_MIN_PRECISION_10_BIT")]
ShaderMinPrecision10Bit = 0x1,
[NativeName("Name", "D3D11_SHADER_MIN_PRECISION_16_BIT")]
ShaderMinPrecision16Bit = 0x2,
}
}
| 26.916667 | 71 | 0.693498 | [
"MIT"
] | Libertus-Lab/Silk.NET | src/Microsoft/Silk.NET.Direct3D11/Enums/ShaderMinPrecisionSupport.gen.cs | 646 | C# |
/*
//-----------------------------------------------------------------------
// <copyright>
//
// Copyright (c) TU Chemnitz, Prof. Technische Thermodynamik
// Written by Noah Pflugradt.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
//
// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the distribution.
// All advertising materials mentioning features or use of this software must display the following acknowledgement:
// “This product includes software developed by the TU Chemnitz, Prof. Technische Thermodynamik and its contributors.”
// Neither the name of the University nor the names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
// BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, S
// PECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; L
// OSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Windows.Media;
using CalcController.CalcFactories;
using Calculation.HouseholdElements;
using Calculation.OnlineLogging;
using CommonDataWPF;
using CommonDataWPF.Enums;
using CommonDataWPF.JSON;
namespace Calculation.Tests.Logfile {
public class ActionLogFileTests : TestBasis {
[Fact]
[SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")]
public static void TestActionLogFileTestsBasics() {
var wd = new WorkingDir(Utili.GetCurrentMethodAndClass());
DateTime startdate = new DateTime(2018, 1, 1);
DateTime enddate = startdate.AddMinutes(1000);
CalcParameters calcParameters = CalcParametersFactory.MakeGoodDefaults().SetStartDate(startdate).SetEndDate(enddate).EnableShowSettlingPeriod();
Config.IsInUnitTesting = true;
var sf = new StreamFactory();
var fft = sf.GetFFT(wd.WorkingDirectory);
fft.RegisterHouseholdKey("HH1-6","hh1-6");
var alf = new ActionLogFile(fft, "HH1-6",calcParameters );
var cl = new CalcLocation("loc", 1);
var r = new Random();
//var nr = new NormalRandom(0, 1, r);
BitArray isSick = new BitArray(calcParameters.InternalTimesteps);
var cp = new CalcPerson("name", 1, 1, r, 1, PermittedGender.Male, null, "HH1-6", cl,"traittag", "hhname0",calcParameters,isSick);
var calcProfile = new CalcProfile("bla",new List<double>(),new Dictionary<int, CalcProfile>(),ProfileType.Absolute, "source" );
//var ae = new ActionEntry(cp, 0, string.Empty, "cat1", "true");
CalcAffordance calcAffordance = new CalcAffordance("blub",1,calcProfile,cl,false,new List<CalcDesire>(),
0,99,PermittedGender.All, false,0,Colors.AliceBlue,"",false,false,new List<CalcAffordanceVariableOp>(),
new List<CalcAffordanceVariableRequirement>(),ActionAfterInterruption.GoBackToOld, "",1,false,"",calcParameters );
alf.WriteEntry( "HH1-6",0,cp,calcAffordance,false);
alf.Close();
(true).Should().Be(true);
wd.CleanUp();
}
[Fact]
[SuppressMessage("ReSharper", "AssignNullToNotNullAttribute")]
public void TestLoading() {
SetUp();
DateTime startdate = new DateTime(2018, 1, 1);
DateTime enddate = startdate.AddMinutes(1000);
CalcParameters calcParameters = CalcParametersFactory.MakeGoodDefaults().SetStartDate(startdate).SetEndDate(enddate).EnableShowSettlingPeriod();
Config.IsInUnitTesting = true;
var sf = new StreamFactory();
var wd = new WorkingDir(Utili.GetCurrentMethodAndClass());
calcParameters.Enable(CalcOption.ActionsLogfile);
var fft = sf.GetFFT(wd.WorkingDirectory);
fft.RegisterHouseholdKey("HH1","bla");
var alf = new ActionLogFile(fft, "HH1",calcParameters);
var cloc = new CalcLocation("cloc", 1);
var cp = MakeCalcPerson(cloc,calcParameters);
var ae = new ActionEntry(cp, 0, string.Empty, "cat1", "true",calcParameters);
var calcProfile = new CalcProfile("bla", new List<double>(), new Dictionary<int, CalcProfile>(), ProfileType.Absolute, "source");
CalcAffordance calcAffordance = new CalcAffordance("blub", 1, calcProfile, cloc, false, new List<CalcDesire>(),
0, 99, PermittedGender.All, false, 0, Colors.AliceBlue, "", false, false, new List<CalcAffordanceVariableOp>(),
new List<CalcAffordanceVariableRequirement>(), ActionAfterInterruption.GoBackToOld, "", 1, false, "",calcParameters);
alf.WriteEntry("HH1",0,cp, calcAffordance,false);
alf.Flush();
var ms = (MemoryStream) fft.GetResultFileEntry(ResultFileID.Actions, null, "HH1",null,null).Stream;
if(ms == null) {
throw new LPGException("Stream was null");
}
ms.Seek(0, SeekOrigin.Begin);
string s;
using (var sr = new StreamReader(ms)) {
sr.ReadLine();
s = sr.ReadLine();
}
if (s == null) {
throw new LPGException("s was null");
}
var readae = new ActionEntry(s,calcParameters);
alf.Close();
(readae.StrPerson).Should().Be(ae.CPerson?.Name);
wd.CleanUp();
TearDown();
}
}
}*/ | 55.378151 | 157 | 0.656601 | [
"MIT"
] | kyleniemeyer/LoadProfileGenerator | Calculation.Tests/Logfile/ActionLogFileTests.cs | 6,596 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerCamCntrl : MonoBehaviour
{
public enum RotationAxes
{
MouseXAndY = 0,
MouseX = 1,
MouseY = 2
}
public RotationAxes axes = RotationAxes.MouseXAndY;
public float sensitivityHor = 9.0f;
public float sensitivityVert = 9.0f;
public float minimumVert = -45.0f;
public float maximumVert = 45.0f;
private float _rotationX = 0;
void Start()
{
Rigidbody body = GetComponent<Rigidbody>();
if (body != null)
body.freezeRotation = true;
Cursor.visible = false;
}
void Update()
{
if (axes == RotationAxes.MouseX)
{
transform.Rotate(0, Input.GetAxis("Mouse X") * sensitivityHor, 0);
}
else if (axes == RotationAxes.MouseY)
{
_rotationX -= Input.GetAxis("Mouse Y") * sensitivityVert;
_rotationX = Mathf.Clamp(_rotationX, minimumVert, maximumVert);
float rotationY = transform.localEulerAngles.y;
transform.localEulerAngles = new Vector3(_rotationX, rotationY, 0);
}
else
{
_rotationX -= Input.GetAxis("Mouse Y") * sensitivityVert;
_rotationX = Mathf.Clamp(_rotationX, minimumVert, maximumVert);
float delta = Input.GetAxis("Mouse X") * sensitivityHor;
float rotationY = transform.localEulerAngles.y + delta;
transform.localEulerAngles = new Vector3(_rotationX, rotationY, 0);
}
}
}
| 32.56 | 80 | 0.591523 | [
"Apache-2.0"
] | DavilkusGames/The_Basement_Of_Fear | The Basement Of Fear/Assets/Scripts/PlayerCamCntrl.cs | 1,630 | C# |
//-----------------------------------------------------------------------
// <copyright file="Helios.Concurrency.DedicatedThreadPool.cs" company="Akka.NET Project">
// Copyright (C) 2009-2021 Lightbend Inc. <http://www.lightbend.com>
// Copyright (C) 2013-2021 .NET Foundation <https://github.com/akkadotnet/akka.net>
// </copyright>
//-----------------------------------------------------------------------
/*
* Copyright 2015 Roger Alsing, Aaron Stannard
* Helios.DedicatedThreadPool - https://github.com/helios-io/DedicatedThreadPool
*/
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
namespace Helios.Concurrency
{
/// <summary>
/// The type of threads to use - either foreground or background threads.
/// </summary>
internal enum ThreadType
{
Foreground,
Background
}
/// <summary>
/// Provides settings for a dedicated thread pool
/// </summary>
internal class DedicatedThreadPoolSettings
{
/// <summary>
/// Background threads are the default thread type
/// </summary>
public const ThreadType DefaultThreadType = ThreadType.Background;
public DedicatedThreadPoolSettings(int numThreads, string name = null, TimeSpan? deadlockTimeout = null)
: this(numThreads, DefaultThreadType, name, deadlockTimeout)
{ }
public DedicatedThreadPoolSettings(
int numThreads,
ThreadType threadType,
string name = null,
TimeSpan? deadlockTimeout = null)
{
Name = name ?? ("DedicatedThreadPool-" + Guid.NewGuid());
ThreadType = threadType;
NumThreads = numThreads;
DeadlockTimeout = deadlockTimeout;
if (deadlockTimeout.HasValue && deadlockTimeout.Value.TotalMilliseconds <= 0)
throw new ArgumentOutOfRangeException("deadlockTimeout", string.Format("deadlockTimeout must be null or at least 1ms. Was {0}.", deadlockTimeout));
if (numThreads <= 0)
throw new ArgumentOutOfRangeException("numThreads", string.Format("numThreads must be at least 1. Was {0}", numThreads));
}
/// <summary>
/// The total number of threads to run in this thread pool.
/// </summary>
public int NumThreads { get; private set; }
/// <summary>
/// The type of threads to run in this thread pool.
/// </summary>
public ThreadType ThreadType { get; private set; }
/// <summary>
/// Interval to check for thread deadlocks.
///
/// If a thread takes longer than <see cref="DeadlockTimeout"/> it will be aborted
/// and replaced.
/// </summary>
public TimeSpan? DeadlockTimeout { get; private set; }
/// <summary>
/// TBD
/// </summary>
public string Name { get; private set; }
/// <summary>
/// TBD
/// </summary>
public Action<Exception> ExceptionHandler { get; private set; }
/// <summary>
/// Gets the thread stack size, 0 represents the default stack size.
/// </summary>
public int ThreadMaxStackSize { get; private set; }
}
/// <summary>
/// TaskScheduler for working with a <see cref="DedicatedThreadPool"/> instance
/// </summary>
internal class DedicatedThreadPoolTaskScheduler : TaskScheduler
{
// Indicates whether the current thread is processing work items.
[ThreadStatic]
private static bool _currentThreadIsRunningTasks;
/// <summary>
/// Number of tasks currently running
/// </summary>
private volatile int _parallelWorkers = 0;
private readonly LinkedList<Task> _tasks = new LinkedList<Task>();
private readonly DedicatedThreadPool _pool;
/// <summary>
/// TBD
/// </summary>
/// <param name="pool">TBD</param>
public DedicatedThreadPoolTaskScheduler(DedicatedThreadPool pool)
{
_pool = pool;
}
/// <summary>
/// TBD
/// </summary>
/// <param name="task">TBD</param>
protected override void QueueTask(Task task)
{
lock (_tasks)
{
_tasks.AddLast(task);
}
EnsureWorkerRequested();
}
/// <summary>
/// TBD
/// </summary>
/// <param name="task">TBD</param>
/// <param name="taskWasPreviouslyQueued">TBD</param>
protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)
{
//current thread isn't running any tasks, can't execute inline
if (!_currentThreadIsRunningTasks) return false;
//remove the task from the queue if it was previously added
if (taskWasPreviouslyQueued)
if (TryDequeue(task))
return TryExecuteTask(task);
else
return false;
return TryExecuteTask(task);
}
/// <summary>
/// TBD
/// </summary>
/// <param name="task">TBD</param>
/// <returns>TBD</returns>
protected override bool TryDequeue(Task task)
{
lock (_tasks) return _tasks.Remove(task);
}
/// <summary>
/// Level of concurrency is directly equal to the number of threads
/// in the <see cref="DedicatedThreadPool"/>.
/// </summary>
public override int MaximumConcurrencyLevel
{
get { return _pool.Settings.NumThreads; }
}
/// <summary>
/// TBD
/// </summary>
/// <exception cref="NotSupportedException">
/// This exception is thrown if can't ensure a thread-safe return of the list of tasks.
/// </exception>
/// <returns>TBD</returns>
protected override IEnumerable<Task> GetScheduledTasks()
{
var lockTaken = false;
try
{
Monitor.TryEnter(_tasks, ref lockTaken);
//should this be immutable?
if (lockTaken) return _tasks;
else throw new NotSupportedException();
}
finally
{
if (lockTaken) Monitor.Exit(_tasks);
}
}
private void EnsureWorkerRequested()
{
var count = _parallelWorkers;
while (count < _pool.Settings.NumThreads)
{
var prev = Interlocked.CompareExchange(ref _parallelWorkers, count + 1, count);
if (prev == count)
{
RequestWorker();
break;
}
count = prev;
}
}
private void ReleaseWorker()
{
var count = _parallelWorkers;
while (count > 0)
{
var prev = Interlocked.CompareExchange(ref _parallelWorkers, count - 1, count);
if (prev == count)
{
break;
}
count = prev;
}
}
private void RequestWorker()
{
_pool.QueueUserWorkItem(() =>
{
// this thread is now available for inlining
_currentThreadIsRunningTasks = true;
try
{
// Process all available items in the queue.
while (true)
{
Task item;
lock (_tasks)
{
// done processing
if (_tasks.Count == 0)
{
ReleaseWorker();
break;
}
// Get the next item from the queue
item = _tasks.First.Value;
_tasks.RemoveFirst();
}
// Execute the task we pulled out of the queue
TryExecuteTask(item);
}
}
// We're done processing items on the current thread
finally { _currentThreadIsRunningTasks = false; }
});
}
}
/// <summary>
/// An instanced, dedicated thread pool.
/// </summary>
internal sealed class DedicatedThreadPool : IDisposable
{
/// <summary>
/// TBD
/// </summary>
/// <param name="settings">TBD</param>
public DedicatedThreadPool(DedicatedThreadPoolSettings settings)
{
_workQueue = new ThreadPoolWorkQueue();
Settings = settings;
_workers = Enumerable.Range(1, settings.NumThreads).Select(workerId => new PoolWorker(this, workerId)).ToArray();
// Note:
// The DedicatedThreadPoolSupervisor was removed because aborting thread could lead to unexpected behavior
// If a new implementation is done, it should spawn a new thread when a worker is not making progress and
// try to keep {settings.NumThreads} active threads.
}
/// <summary>
/// TBD
/// </summary>
public DedicatedThreadPoolSettings Settings { get; private set; }
private readonly ThreadPoolWorkQueue _workQueue;
private readonly PoolWorker[] _workers;
/// <summary>
/// TBD
/// </summary>
/// <exception cref="ArgumentNullException">
/// This exception is thrown if the given <paramref name="work"/> item is undefined.
/// </exception>
/// <returns>TBD</returns>
public bool QueueUserWorkItem(Action work)
{
if (work == null)
throw new ArgumentNullException(nameof(work), "Work item cannot be null.");
return _workQueue.TryAdd(work);
}
/// <summary>
/// TBD
/// </summary>
public void Dispose()
{
_workQueue.CompleteAdding();
}
/// <summary>
/// TBD
/// </summary>
public void WaitForThreadsExit()
{
WaitForThreadsExit(Timeout.InfiniteTimeSpan);
}
/// <summary>
/// TBD
/// </summary>
/// <param name="timeout">TBD</param>
public void WaitForThreadsExit(TimeSpan timeout)
{
Task.WaitAll(_workers.Select(worker => worker.ThreadExit).ToArray(), timeout);
}
#region Pool worker implementation
private class PoolWorker
{
private readonly DedicatedThreadPool _pool;
private readonly TaskCompletionSource<object> _threadExit;
public Task ThreadExit
{
get { return _threadExit.Task; }
}
public PoolWorker(DedicatedThreadPool pool, int workerId)
{
_pool = pool;
_threadExit = new TaskCompletionSource<object>();
var thread = new Thread(RunThread)
{
IsBackground = pool.Settings.ThreadType == ThreadType.Background,
};
if (pool.Settings.Name != null)
thread.Name = string.Format("{0}_{1}", pool.Settings.Name, workerId);
thread.Start();
}
private void RunThread()
{
try
{
foreach (var action in _pool._workQueue.GetConsumingEnumerable())
{
try
{
action();
}
catch (Exception ex)
{
_pool.Settings.ExceptionHandler(ex);
}
}
}
finally
{
_threadExit.TrySetResult(null);
}
}
}
#endregion
#region WorkQueue implementation
private class ThreadPoolWorkQueue
{
private static readonly int ProcessorCount = Environment.ProcessorCount;
private const int CompletedState = 1;
private readonly ConcurrentQueue<Action> _queue = new ConcurrentQueue<Action>();
private readonly UnfairSemaphore _semaphore = new UnfairSemaphore();
private int _outstandingRequests;
private int _isAddingCompleted;
public bool IsAddingCompleted
{
get { return Volatile.Read(ref _isAddingCompleted) == CompletedState; }
}
public bool TryAdd(Action work)
{
// If TryAdd returns true, it's guaranteed the work item will be executed.
// If it returns false, it's also guaranteed the work item won't be executed.
if (IsAddingCompleted)
return false;
_queue.Enqueue(work);
EnsureThreadRequested();
return true;
}
public IEnumerable<Action> GetConsumingEnumerable()
{
while (true)
{
Action work;
if (_queue.TryDequeue(out work))
{
yield return work;
}
else if (IsAddingCompleted)
{
while (_queue.TryDequeue(out work))
yield return work;
break;
}
else
{
_semaphore.Wait();
MarkThreadRequestSatisfied();
}
}
}
public void CompleteAdding()
{
int previousCompleted = Interlocked.Exchange(ref _isAddingCompleted, CompletedState);
if (previousCompleted == CompletedState)
return;
// When CompleteAdding() is called, we fill up the _outstandingRequests and the semaphore
// This will ensure that all threads will unblock and try to execute the remaining item in
// the queue. When IsAddingCompleted is set, all threads will exit once the queue is empty.
while (true)
{
int count = Volatile.Read(ref _outstandingRequests);
int countToRelease = UnfairSemaphore.MaxWorker - count;
int prev = Interlocked.CompareExchange(ref _outstandingRequests, UnfairSemaphore.MaxWorker, count);
if (prev == count)
{
_semaphore.Release((short)countToRelease);
break;
}
}
}
private void EnsureThreadRequested()
{
// There is a double counter here (_outstandingRequest and _semaphore)
// Unfair semaphore does not support value bigger than short.MaxValue,
// trying to Release more than short.MaxValue could fail miserably.
// The _outstandingRequest counter ensure that we only request a
// maximum of {ProcessorCount} to the semaphore.
// It's also more efficient to have two counter, _outstandingRequests is
// more lightweight than the semaphore.
// This trick is borrowed from the .Net ThreadPool
// https://github.com/dotnet/coreclr/blob/bc146608854d1db9cdbcc0b08029a87754e12b49/src/mscorlib/src/System/Threading/ThreadPool.cs#L568
int count = Volatile.Read(ref _outstandingRequests);
while (count < ProcessorCount)
{
int prev = Interlocked.CompareExchange(ref _outstandingRequests, count + 1, count);
if (prev == count)
{
_semaphore.Release();
break;
}
count = prev;
}
}
private void MarkThreadRequestSatisfied()
{
int count = Volatile.Read(ref _outstandingRequests);
while (count > 0)
{
int prev = Interlocked.CompareExchange(ref _outstandingRequests, count - 1, count);
if (prev == count)
{
break;
}
count = prev;
}
}
}
#endregion
#region UnfairSemaphore implementation
// This class has been translated from:
// https://github.com/dotnet/coreclr/blob/97433b9d153843492008652ff6b7c3bf4d9ff31c/src/vm/win32threadpool.h#L124
// UnfairSemaphore is a more scalable semaphore than Semaphore. It prefers to release threads that have more recently begun waiting,
// to preserve locality. Additionally, very recently-waiting threads can be released without an addition kernel transition to unblock
// them, which reduces latency.
//
// UnfairSemaphore is only appropriate in scenarios where the order of unblocking threads is not important, and where threads frequently
// need to be woken.
[StructLayout(LayoutKind.Sequential)]
private sealed class UnfairSemaphore
{
public const int MaxWorker = 0x7FFF;
private static readonly int ProcessorCount = Environment.ProcessorCount;
// We track everything we care about in a single 64-bit struct to allow us to
// do CompareExchanges on this for atomic updates.
[StructLayout(LayoutKind.Explicit)]
private struct SemaphoreState
{
//how many threads are currently spin-waiting for this semaphore?
[FieldOffset(0)]
public short Spinners;
//how much of the semaphore's count is available to spinners?
[FieldOffset(2)]
public short CountForSpinners;
//how many threads are blocked in the OS waiting for this semaphore?
[FieldOffset(4)]
public short Waiters;
//how much count is available to waiters?
[FieldOffset(6)]
public short CountForWaiters;
[FieldOffset(0)]
public long RawData;
}
[StructLayout(LayoutKind.Explicit, Size = 64)]
private struct CacheLinePadding
{ }
private readonly Semaphore m_semaphore;
// padding to ensure we get our own cache line
#pragma warning disable 169
private readonly CacheLinePadding m_padding1;
private SemaphoreState m_state;
private readonly CacheLinePadding m_padding2;
#pragma warning restore 169
public UnfairSemaphore()
{
m_semaphore = new Semaphore(0, short.MaxValue);
}
public bool Wait()
{
return Wait(Timeout.InfiniteTimeSpan);
}
public bool Wait(TimeSpan timeout)
{
while (true)
{
SemaphoreState currentCounts = GetCurrentState();
SemaphoreState newCounts = currentCounts;
// First, just try to grab some count.
if (currentCounts.CountForSpinners > 0)
{
--newCounts.CountForSpinners;
if (TryUpdateState(newCounts, currentCounts))
return true;
}
else
{
// No count available, become a spinner
++newCounts.Spinners;
if (TryUpdateState(newCounts, currentCounts))
break;
}
}
//
// Now we're a spinner.
//
int numSpins = 0;
const int spinLimitPerProcessor = 50;
while (true)
{
SemaphoreState currentCounts = GetCurrentState();
SemaphoreState newCounts = currentCounts;
if (currentCounts.CountForSpinners > 0)
{
--newCounts.CountForSpinners;
--newCounts.Spinners;
if (TryUpdateState(newCounts, currentCounts))
return true;
}
else
{
double spinnersPerProcessor = (double)currentCounts.Spinners / ProcessorCount;
int spinLimit = (int)((spinLimitPerProcessor / spinnersPerProcessor) + 0.5);
if (numSpins >= spinLimit)
{
--newCounts.Spinners;
++newCounts.Waiters;
if (TryUpdateState(newCounts, currentCounts))
break;
}
else
{
//
// We yield to other threads using Thread.Sleep(0) rather than the more traditional Thread.Yield().
// This is because Thread.Yield() does not yield to threads currently scheduled to run on other
// processors. On a 4-core machine, for example, this means that Thread.Yield() is only ~25% likely
// to yield to the correct thread in some scenarios.
// Thread.Sleep(0) has the disadvantage of not yielding to lower-priority threads. However, this is ok because
// once we've called this a few times we'll become a "waiter" and wait on the Semaphore, and that will
// yield to anything that is runnable.
//
Thread.Sleep(0);
numSpins++;
}
}
}
//
// Now we're a waiter
//
bool waitSucceeded = m_semaphore.WaitOne(timeout);
while (true)
{
SemaphoreState currentCounts = GetCurrentState();
SemaphoreState newCounts = currentCounts;
--newCounts.Waiters;
if (waitSucceeded)
--newCounts.CountForWaiters;
if (TryUpdateState(newCounts, currentCounts))
return waitSucceeded;
}
}
public void Release()
{
Release(1);
}
public void Release(short count)
{
while (true)
{
SemaphoreState currentState = GetCurrentState();
SemaphoreState newState = currentState;
short remainingCount = count;
// First, prefer to release existing spinners,
// because a) they're hot, and b) we don't need a kernel
// transition to release them.
short spinnersToRelease = Math.Max((short)0, Math.Min(remainingCount, (short)(currentState.Spinners - currentState.CountForSpinners)));
newState.CountForSpinners += spinnersToRelease;
remainingCount -= spinnersToRelease;
// Next, prefer to release existing waiters
short waitersToRelease = Math.Max((short)0, Math.Min(remainingCount, (short)(currentState.Waiters - currentState.CountForWaiters)));
newState.CountForWaiters += waitersToRelease;
remainingCount -= waitersToRelease;
// Finally, release any future spinners that might come our way
newState.CountForSpinners += remainingCount;
// Try to commit the transaction
if (TryUpdateState(newState, currentState))
{
// Now we need to release the waiters we promised to release
if (waitersToRelease > 0)
m_semaphore.Release(waitersToRelease);
break;
}
}
}
private bool TryUpdateState(SemaphoreState newState, SemaphoreState currentState)
{
if (Interlocked.CompareExchange(ref m_state.RawData, newState.RawData, currentState.RawData) == currentState.RawData)
{
Debug.Assert(newState.CountForSpinners <= MaxWorker, "CountForSpinners is greater than MaxWorker");
Debug.Assert(newState.CountForSpinners >= 0, "CountForSpinners is lower than zero");
Debug.Assert(newState.Spinners <= MaxWorker, "Spinners is greater than MaxWorker");
Debug.Assert(newState.Spinners >= 0, "Spinners is lower than zero");
Debug.Assert(newState.CountForWaiters <= MaxWorker, "CountForWaiters is greater than MaxWorker");
Debug.Assert(newState.CountForWaiters >= 0, "CountForWaiters is lower than zero");
Debug.Assert(newState.Waiters <= MaxWorker, "Waiters is greater than MaxWorker");
Debug.Assert(newState.Waiters >= 0, "Waiters is lower than zero");
Debug.Assert(newState.CountForSpinners + newState.CountForWaiters <= MaxWorker, "CountForSpinners + CountForWaiters is greater than MaxWorker");
return true;
}
return false;
}
private SemaphoreState GetCurrentState()
{
// Volatile.Read of a long can get a partial read in x86 but the invalid
// state will be detected in TryUpdateState with the CompareExchange.
SemaphoreState state = new SemaphoreState();
state.RawData = Volatile.Read(ref m_state.RawData);
return state;
}
}
#endregion
}
}
| 36.315013 | 164 | 0.511203 | [
"Apache-2.0"
] | Aaronontheweb/akka.net | src/core/Akka/Helios.Concurrency.DedicatedThreadPool.cs | 27,093 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager.Sql.Models;
namespace Azure.ResourceManager.Sql
{
internal partial class TransparentDataEncryptionsRestOperations
{
private readonly TelemetryDetails _userAgent;
private readonly HttpPipeline _pipeline;
private readonly Uri _endpoint;
private readonly string _apiVersion;
/// <summary> Initializes a new instance of TransparentDataEncryptionsRestOperations. </summary>
/// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
/// <param name="applicationId"> The application id to use for user agent. </param>
/// <param name="endpoint"> server parameter. </param>
/// <param name="apiVersion"> Api Version. </param>
/// <exception cref="ArgumentNullException"> <paramref name="pipeline"/> or <paramref name="apiVersion"/> is null. </exception>
public TransparentDataEncryptionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default)
{
_pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline));
_endpoint = endpoint ?? new Uri("https://management.azure.com");
_apiVersion = apiVersion ?? "2021-02-01-preview";
_userAgent = new TelemetryDetails(GetType().Assembly, applicationId);
}
internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionName tdeName)
{
var message = _pipeline.CreateMessage();
var request = message.Request;
request.Method = RequestMethod.Get;
var uri = new RawRequestUriBuilder();
uri.Reset(_endpoint);
uri.AppendPath("/subscriptions/", false);
uri.AppendPath(subscriptionId, true);
uri.AppendPath("/resourceGroups/", false);
uri.AppendPath(resourceGroupName, true);
uri.AppendPath("/providers/Microsoft.Sql/servers/", false);
uri.AppendPath(serverName, true);
uri.AppendPath("/databases/", false);
uri.AppendPath(databaseName, true);
uri.AppendPath("/transparentDataEncryption/", false);
uri.AppendPath(tdeName.ToString(), true);
uri.AppendQuery("api-version", _apiVersion, true);
request.Uri = uri;
request.Headers.Add("Accept", "application/json");
_userAgent.Apply(message);
return message;
}
/// <summary> Gets a logical database's transparent data encryption. </summary>
/// <param name="subscriptionId"> The subscription ID that identifies an Azure subscription. </param>
/// <param name="resourceGroupName"> The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. </param>
/// <param name="serverName"> The name of the server. </param>
/// <param name="databaseName"> The name of the logical database for which the transparent data encryption is defined. </param>
/// <param name="tdeName"> The name of the transparent data encryption configuration. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is an empty string, and was expected to be non-empty. </exception>
public async Task<Response<LogicalDatabaseTransparentDataEncryptionData>> GetAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionName tdeName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
Argument.AssertNotNullOrEmpty(serverName, nameof(serverName));
Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName));
using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName, tdeName);
await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
switch (message.Response.Status)
{
case 200:
{
LogicalDatabaseTransparentDataEncryptionData value = default;
using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
value = LogicalDatabaseTransparentDataEncryptionData.DeserializeLogicalDatabaseTransparentDataEncryptionData(document.RootElement);
return Response.FromValue(value, message.Response);
}
case 404:
return Response.FromValue((LogicalDatabaseTransparentDataEncryptionData)null, message.Response);
default:
throw new RequestFailedException(message.Response);
}
}
/// <summary> Gets a logical database's transparent data encryption. </summary>
/// <param name="subscriptionId"> The subscription ID that identifies an Azure subscription. </param>
/// <param name="resourceGroupName"> The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. </param>
/// <param name="serverName"> The name of the server. </param>
/// <param name="databaseName"> The name of the logical database for which the transparent data encryption is defined. </param>
/// <param name="tdeName"> The name of the transparent data encryption configuration. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is an empty string, and was expected to be non-empty. </exception>
public Response<LogicalDatabaseTransparentDataEncryptionData> Get(string subscriptionId, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionName tdeName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
Argument.AssertNotNullOrEmpty(serverName, nameof(serverName));
Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName));
using var message = CreateGetRequest(subscriptionId, resourceGroupName, serverName, databaseName, tdeName);
_pipeline.Send(message, cancellationToken);
switch (message.Response.Status)
{
case 200:
{
LogicalDatabaseTransparentDataEncryptionData value = default;
using var document = JsonDocument.Parse(message.Response.ContentStream);
value = LogicalDatabaseTransparentDataEncryptionData.DeserializeLogicalDatabaseTransparentDataEncryptionData(document.RootElement);
return Response.FromValue(value, message.Response);
}
case 404:
return Response.FromValue((LogicalDatabaseTransparentDataEncryptionData)null, message.Response);
default:
throw new RequestFailedException(message.Response);
}
}
internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionData parameters)
{
var message = _pipeline.CreateMessage();
var request = message.Request;
request.Method = RequestMethod.Put;
var uri = new RawRequestUriBuilder();
uri.Reset(_endpoint);
uri.AppendPath("/subscriptions/", false);
uri.AppendPath(subscriptionId, true);
uri.AppendPath("/resourceGroups/", false);
uri.AppendPath(resourceGroupName, true);
uri.AppendPath("/providers/Microsoft.Sql/servers/", false);
uri.AppendPath(serverName, true);
uri.AppendPath("/databases/", false);
uri.AppendPath(databaseName, true);
uri.AppendPath("/transparentDataEncryption/", false);
uri.AppendPath(tdeName.ToString(), true);
uri.AppendQuery("api-version", _apiVersion, true);
request.Uri = uri;
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Content-Type", "application/json");
var content = new Utf8JsonRequestContent();
content.JsonWriter.WriteObjectValue(parameters);
request.Content = content;
_userAgent.Apply(message);
return message;
}
/// <summary> Updates a logical database's transparent data encryption configuration. </summary>
/// <param name="subscriptionId"> The subscription ID that identifies an Azure subscription. </param>
/// <param name="resourceGroupName"> The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. </param>
/// <param name="serverName"> The name of the server. </param>
/// <param name="databaseName"> The name of the logical database for which the security alert policy is defined. </param>
/// <param name="tdeName"> The name of the transparent data encryption configuration. </param>
/// <param name="parameters"> The database transparent data encryption. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/>, <paramref name="databaseName"/> or <paramref name="parameters"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is an empty string, and was expected to be non-empty. </exception>
public async Task<Response<LogicalDatabaseTransparentDataEncryptionData>> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionData parameters, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
Argument.AssertNotNullOrEmpty(serverName, nameof(serverName));
Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName));
Argument.AssertNotNull(parameters, nameof(parameters));
using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, tdeName, parameters);
await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
switch (message.Response.Status)
{
case 200:
case 201:
{
LogicalDatabaseTransparentDataEncryptionData value = default;
using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
value = LogicalDatabaseTransparentDataEncryptionData.DeserializeLogicalDatabaseTransparentDataEncryptionData(document.RootElement);
return Response.FromValue(value, message.Response);
}
case 202:
return Response.FromValue((LogicalDatabaseTransparentDataEncryptionData)null, message.Response);
default:
throw new RequestFailedException(message.Response);
}
}
/// <summary> Updates a logical database's transparent data encryption configuration. </summary>
/// <param name="subscriptionId"> The subscription ID that identifies an Azure subscription. </param>
/// <param name="resourceGroupName"> The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. </param>
/// <param name="serverName"> The name of the server. </param>
/// <param name="databaseName"> The name of the logical database for which the security alert policy is defined. </param>
/// <param name="tdeName"> The name of the transparent data encryption configuration. </param>
/// <param name="parameters"> The database transparent data encryption. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/>, <paramref name="databaseName"/> or <paramref name="parameters"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is an empty string, and was expected to be non-empty. </exception>
public Response<LogicalDatabaseTransparentDataEncryptionData> CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string databaseName, TransparentDataEncryptionName tdeName, LogicalDatabaseTransparentDataEncryptionData parameters, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
Argument.AssertNotNullOrEmpty(serverName, nameof(serverName));
Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName));
Argument.AssertNotNull(parameters, nameof(parameters));
using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, tdeName, parameters);
_pipeline.Send(message, cancellationToken);
switch (message.Response.Status)
{
case 200:
case 201:
{
LogicalDatabaseTransparentDataEncryptionData value = default;
using var document = JsonDocument.Parse(message.Response.ContentStream);
value = LogicalDatabaseTransparentDataEncryptionData.DeserializeLogicalDatabaseTransparentDataEncryptionData(document.RootElement);
return Response.FromValue(value, message.Response);
}
case 202:
return Response.FromValue((LogicalDatabaseTransparentDataEncryptionData)null, message.Response);
default:
throw new RequestFailedException(message.Response);
}
}
internal HttpMessage CreateListByDatabaseRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName)
{
var message = _pipeline.CreateMessage();
var request = message.Request;
request.Method = RequestMethod.Get;
var uri = new RawRequestUriBuilder();
uri.Reset(_endpoint);
uri.AppendPath("/subscriptions/", false);
uri.AppendPath(subscriptionId, true);
uri.AppendPath("/resourceGroups/", false);
uri.AppendPath(resourceGroupName, true);
uri.AppendPath("/providers/Microsoft.Sql/servers/", false);
uri.AppendPath(serverName, true);
uri.AppendPath("/databases/", false);
uri.AppendPath(databaseName, true);
uri.AppendPath("/transparentDataEncryption", false);
uri.AppendQuery("api-version", _apiVersion, true);
request.Uri = uri;
request.Headers.Add("Accept", "application/json");
_userAgent.Apply(message);
return message;
}
/// <summary> Gets a list of the logical database's transparent data encryption. </summary>
/// <param name="subscriptionId"> The subscription ID that identifies an Azure subscription. </param>
/// <param name="resourceGroupName"> The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. </param>
/// <param name="serverName"> The name of the server. </param>
/// <param name="databaseName"> The name of the logical database for which the transparent data encryption is defined. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is an empty string, and was expected to be non-empty. </exception>
public async Task<Response<LogicalDatabaseTransparentDataEncryptionListResult>> ListByDatabaseAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
Argument.AssertNotNullOrEmpty(serverName, nameof(serverName));
Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName));
using var message = CreateListByDatabaseRequest(subscriptionId, resourceGroupName, serverName, databaseName);
await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
switch (message.Response.Status)
{
case 200:
{
LogicalDatabaseTransparentDataEncryptionListResult value = default;
using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
value = LogicalDatabaseTransparentDataEncryptionListResult.DeserializeLogicalDatabaseTransparentDataEncryptionListResult(document.RootElement);
return Response.FromValue(value, message.Response);
}
default:
throw new RequestFailedException(message.Response);
}
}
/// <summary> Gets a list of the logical database's transparent data encryption. </summary>
/// <param name="subscriptionId"> The subscription ID that identifies an Azure subscription. </param>
/// <param name="resourceGroupName"> The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. </param>
/// <param name="serverName"> The name of the server. </param>
/// <param name="databaseName"> The name of the logical database for which the transparent data encryption is defined. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is an empty string, and was expected to be non-empty. </exception>
public Response<LogicalDatabaseTransparentDataEncryptionListResult> ListByDatabase(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
Argument.AssertNotNullOrEmpty(serverName, nameof(serverName));
Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName));
using var message = CreateListByDatabaseRequest(subscriptionId, resourceGroupName, serverName, databaseName);
_pipeline.Send(message, cancellationToken);
switch (message.Response.Status)
{
case 200:
{
LogicalDatabaseTransparentDataEncryptionListResult value = default;
using var document = JsonDocument.Parse(message.Response.ContentStream);
value = LogicalDatabaseTransparentDataEncryptionListResult.DeserializeLogicalDatabaseTransparentDataEncryptionListResult(document.RootElement);
return Response.FromValue(value, message.Response);
}
default:
throw new RequestFailedException(message.Response);
}
}
internal HttpMessage CreateListByDatabaseNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serverName, string databaseName)
{
var message = _pipeline.CreateMessage();
var request = message.Request;
request.Method = RequestMethod.Get;
var uri = new RawRequestUriBuilder();
uri.Reset(_endpoint);
uri.AppendRawNextLink(nextLink, false);
request.Uri = uri;
request.Headers.Add("Accept", "application/json");
_userAgent.Apply(message);
return message;
}
/// <summary> Gets a list of the logical database's transparent data encryption. </summary>
/// <param name="nextLink"> The URL to the next page of results. </param>
/// <param name="subscriptionId"> The subscription ID that identifies an Azure subscription. </param>
/// <param name="resourceGroupName"> The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. </param>
/// <param name="serverName"> The name of the server. </param>
/// <param name="databaseName"> The name of the logical database for which the transparent data encryption is defined. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="nextLink"/>, <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is an empty string, and was expected to be non-empty. </exception>
public async Task<Response<LogicalDatabaseTransparentDataEncryptionListResult>> ListByDatabaseNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(nextLink, nameof(nextLink));
Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
Argument.AssertNotNullOrEmpty(serverName, nameof(serverName));
Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName));
using var message = CreateListByDatabaseNextPageRequest(nextLink, subscriptionId, resourceGroupName, serverName, databaseName);
await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
switch (message.Response.Status)
{
case 200:
{
LogicalDatabaseTransparentDataEncryptionListResult value = default;
using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
value = LogicalDatabaseTransparentDataEncryptionListResult.DeserializeLogicalDatabaseTransparentDataEncryptionListResult(document.RootElement);
return Response.FromValue(value, message.Response);
}
default:
throw new RequestFailedException(message.Response);
}
}
/// <summary> Gets a list of the logical database's transparent data encryption. </summary>
/// <param name="nextLink"> The URL to the next page of results. </param>
/// <param name="subscriptionId"> The subscription ID that identifies an Azure subscription. </param>
/// <param name="resourceGroupName"> The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. </param>
/// <param name="serverName"> The name of the server. </param>
/// <param name="databaseName"> The name of the logical database for which the transparent data encryption is defined. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> <paramref name="nextLink"/>, <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is null. </exception>
/// <exception cref="ArgumentException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="serverName"/> or <paramref name="databaseName"/> is an empty string, and was expected to be non-empty. </exception>
public Response<LogicalDatabaseTransparentDataEncryptionListResult> ListByDatabaseNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(nextLink, nameof(nextLink));
Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
Argument.AssertNotNullOrEmpty(serverName, nameof(serverName));
Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName));
using var message = CreateListByDatabaseNextPageRequest(nextLink, subscriptionId, resourceGroupName, serverName, databaseName);
_pipeline.Send(message, cancellationToken);
switch (message.Response.Status)
{
case 200:
{
LogicalDatabaseTransparentDataEncryptionListResult value = default;
using var document = JsonDocument.Parse(message.Response.ContentStream);
value = LogicalDatabaseTransparentDataEncryptionListResult.DeserializeLogicalDatabaseTransparentDataEncryptionListResult(document.RootElement);
return Response.FromValue(value, message.Response);
}
default:
throw new RequestFailedException(message.Response);
}
}
}
}
| 73.2375 | 333 | 0.680765 | [
"MIT"
] | Ramananaidu/dotnet-sonarqube | sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TransparentDataEncryptionsRestOperations.cs | 29,295 | C# |
#region
using System.IO;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Web;
using System.Web.Http;
using Microsoft.Azure.Documents;
using Microsoft.Azure.Documents.Client;
using Swashbuckle.Swagger.Annotations;
using TRex.Metadata;
#endregion
namespace LADocDbAPI.Controllers
{
/// <summary>
/// </summary>
public class AttachmentsController : ApiController
{
/// <summary>
/// Get List Of Attachments
/// </summary>
/// <param name="ridDb">DatabaseId</param>
/// <param name="ridColl">CollectionId</param>
/// <param name="ridDoc">DocumentId</param>
/// <param name="query"></param>
/// <param name="partitionKey">
/// Must be included if and only if the collection is created with a partitionKey definition
/// </param>
/// <returns></returns>
[Metadata("GetAttachment", "Get a Attachment under a Document")]
[HttpGet, Route("{ridDb}/colls/{ridColl}/docs/{ridDoc}/attachments")]
[SwaggerOperation("GetListOfAttachments")]
[SwaggerResponse(HttpStatusCode.NotFound)]
public IQueryable<dynamic> GetAttachment(
string ridDb,
string ridColl,
string ridDoc,
string query,
string partitionKey = null)
{
var feedOptions = new FeedOptions();
if (partitionKey != null)
{
feedOptions.PartitionKey = new PartitionKey(partitionKey);
}
else
{
feedOptions = null;
}
var dbContext = new DocumentDbContext();
var doclLink = UriFactory.CreateDocumentUri(ridDb, ridColl, ridDoc);
return dbContext.ReadClient.CreateAttachmentQuery(doclLink, query, feedOptions);
}
/// <summary>
/// Create an Attachment
/// </summary>
/// <param name="ridDb">DatabaseId</param>
/// <param name="ridColl">CollectionId</param>
/// <param name="ridDoc">DocunentId</param>
/// <param name="mediaLink">You can reuse the mediaLink property to store an external location e.g.,
/// a file share or an Azure Blob Storage URI.
/// DocumentDB will not perform garbage collection on mediaLinks for external locations.
/// </param>
/// <param name="partitionKey">
/// Must be included if and only if the collection is created with a partitionKey definition
/// </param>
/// <param name="slug">
/// The name of the attachment(with extension). This is only **required** when raw media is submitted to the
/// DocumentDB attachment storage
/// </param>
/// <param name="mediaStream">Attachment File as a stream. Requires the Slug</param>
/// <returns></returns>
[Metadata("CreateAttachment",
"There are two ways to create an attachment resource – post the media content to DocumentDB like in the AtomPub Protocol , or post just the attachment metadata to media stored externally. " +
"<br /><br />" +
"Attachments can be created as managed or unmanaged. If attachments are created as managed through DocumentDB, then it is assigned a system generated mediaLink. DocumentDB then automatically performs garbage collection on the media when parent document is deleted "
)]
[HttpPost, Route("{ridDb}/colls/{ridColl}/docs/{ridDoc}/attachments")]
[SwaggerOperation("CreateAttachment")]
[SwaggerResponse(HttpStatusCode.Created)]
[SwaggerResponse(HttpStatusCode.BadRequest, "The JSON body is invalid")]
[SwaggerResponse(HttpStatusCode.Conflict,
"The id or Slug provided for the new attachment has been taken by an existing attachment."
)]
[SwaggerResponse(HttpStatusCode.RequestEntityTooLarge,
"The document size in the request exceeded the allowable document size in a request, which is 512k")]
public async Task<ResourceResponse<Attachment>> CreateAttachment(
[Metadata("DatabaseId")] string ridDb,
[Metadata("CollectionId")] string ridColl,
string ridDoc,
object mediaLink = null,
string partitionKey = null,
string slug = null,
Stream mediaStream = null)
{
var doclLink = UriFactory.CreateDocumentUri(ridColl, ridColl, ridDoc);
var contentType = string.Empty;
if (!string.IsNullOrEmpty(slug))
{
contentType = MimeMapping.GetMimeMapping(slug);
}
var requestOptions = new RequestOptions();
if (partitionKey != null)
{
requestOptions.PartitionKey = new PartitionKey(partitionKey);
}
else
{
requestOptions = null;
}
var dbContext = new DocumentDbContext();
if (mediaStream == null && mediaLink != null)
{
return
await
dbContext.Client.CreateAttachmentAsync(doclLink, mediaLink, requestOptions).ConfigureAwait(false);
}
return await dbContext.Client.CreateAttachmentAsync(doclLink, mediaStream,
new MediaOptions {ContentType = contentType, Slug = slug }, requestOptions).ConfigureAwait(false);
}
}
} | 41.306569 | 282 | 0.59074 | [
"MIT"
] | HowardEdidin/LADocDbAPI | LADocDbAPI/Controllers/AttachmentsController.cs | 5,663 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace NuGet.Services.Metadata.Catalog {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Strings {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Strings() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NuGet.Services.Metadata.Catalog.Strings", typeof(Strings).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to The argument must not be null or empty..
/// </summary>
internal static string ArgumentMustNotBeNullOrEmpty {
get {
return ResourceManager.GetString("ArgumentMustNotBeNullOrEmpty", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The argument must be within the range from {0} (inclusive) to {1} (inclusive)..
/// </summary>
internal static string ArgumentOutOfRange {
get {
return ResourceManager.GetString("ArgumentOutOfRange", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A failure occurred while processing a catalog batch..
/// </summary>
internal static string BatchProcessingFailure {
get {
return ResourceManager.GetString("BatchProcessingFailure", resourceCulture);
}
}
}
}
| 42.516484 | 182 | 0.60093 | [
"Apache-2.0"
] | zhhyu/NuGet.Services.Metadata | src/Catalog/Strings.Designer.cs | 3,871 | C# |
/*
Copyright (C) 2015 Electronic Arts Inc. All rights reserved.
This software is solely licensed pursuant to the Hackathon License Agreement,
Available at: [URL to Hackathon License Agreement].
All other use is strictly prohibited.
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using UnityEngine;
using SocketIO;
namespace BladeCast
{
/// <summary>
/// Lite weight lib provider for unity.
/// </summary>
public class BCLibProvider : MonoPersistentSingleton<BCLibProvider>
{
/// <summary>
/// RRR message index -- taken from libprovider (new). Used to translate message
/// types into callbacks...
/// </summary>
enum RRRMessageIndex
{
Closed = 0,
Init = 1,
Error = 2,
Logs = 3,
RegisterController = 4,
RegisterSTB = 5,
SetState = 6,
GameMessage = 7,
EndGameUserInput = 8,
GameCommand = 9,
Ping = 10,
SystemMessage = 11,
RegisterGame = 12,
Mouse = 13,
Keyboard = 14,
Joystick = 15,
Telemetry = 16,
StoreSuccess = 17,
StoreFailure = 18
}
public delegate void BladecastMessageDelegate (System.IntPtr token,JSONObject contents,int controlIndex);
private SocketIOComponent mSocketComponent = null;
private BladecastMessageDelegate mMessageCallback = null;
private bool mIsConnected = false;
protected override void Awake()
{
base.Awake();
mSocketComponent = SocketIOComponent.Instance;
mSocketComponent.Init ();
mSocketComponent.Connect ();
// setup message received callback...
if (mSocketComponent != null) {
mSocketComponent.On ("game_message", OnMessage);
mSocketComponent.On ("open", OnOpen);
mSocketComponent.On ("error", OnError);
mSocketComponent.On ("close", OnClose);
mSocketComponent.On ("ping", OnPing);
}
}
public bool BladeCast_Game_IsConnected ()
{
return mIsConnected;
}
/// <summary>
/// The message MUST be in a format similar to this...
/// {"data":{"tid":7,"payload":{<payload>}}}
/// tid: message type ID (general type) (7 = game_message).
/// payload: the contents of the message. This is per-game.
/// </summary>
public System.Int32 BladeCast_Game_SendMessage (JSONObject msg)
{
if (mIsConnected)
{
JSONObject i = new JSONObject (JSONObject.Type.OBJECT);
JSONObject j = new JSONObject (JSONObject.Type.OBJECT);
j.AddField ("tid", (int)RRRMessageIndex.GameMessage);
j.AddField ("payload", msg);
i.AddField ("data", j);
mSocketComponent.Emit ("game_message", i);
}
else
{
Debug.LogError ("Game Message Sent When Server Not Connected");
}
return 0;
}
public System.Int32 BladeCast_Game_Close ()
{
mIsConnected = false;
return 0;
}
public System.Int32 BladeCast_Game_RegisterMessageCB (BladecastMessageDelegate cb)
{
mMessageCallback = cb;
return 0;
}
/// <summary>
/// Utility to check if field is in a json object and report error.
/// </summary>
public bool FieldCheck(JSONObject json, string fieldName)
{
bool retValue = json.HasField (fieldName);
if (!retValue)
Debug.LogError (string.Format ("Message Missing Field: \"{0}\" : {1}", fieldName, json.ToString ()));
return retValue;
}
private void OnOpen (SocketIOEvent e)
{
if (!mIsConnected) {
Debug.Log ("[SocketIO] Open received: " + e.name + " " + e.data);
mIsConnected = true;
mSocketComponent.Emit ("unity");
}
}
private void OnError (SocketIOEvent e)
{
Debug.Log ("[SocketIO] Error received: " + e.name + " " + e.data);
}
private void OnClose (SocketIOEvent e)
{
Debug.Log ("[SocketIO] Close received: " + e.name + " " + e.data);
mIsConnected = false;
}
private void OnPing(SocketIOEvent e)
{
mSocketComponent.Emit ("pong");
}
/// <summary>
/// Raises the message event -- handles messages coming from controller(s) to unity by calling message handler.
/// Dispatches messages based on type.
/// </summary>
private void OnMessage (SocketIOEvent e)
{
JSONObject msg = e.data;
RRRMessageIndex tid = (RRRMessageIndex)msg ["tid"].i;
switch (tid) {
case RRRMessageIndex.GameMessage:
bool validate = true;
validate &= FieldCheck(msg, "payload");
validate &= FieldCheck(msg, "index");
if(validate)
mMessageCallback ((System.IntPtr)(0), msg ["payload"], msg ["index"].i);
break;
default:
Debug.LogError (string.Format ("Unknown message type %d in data: '%s'", tid, msg.ToString ()));
break;
}
}
}
} | 26.027778 | 113 | 0.64952 | [
"MIT"
] | ddiep003/DANK-TANKZ | PROJECTTANKS/Assets/EA Pathfinders/Scripts/BladeCast/BCLibProvider.cs | 4,685 | C# |
using Microsoft.EntityFrameworkCore;
using SIO.EntityFrameworkCore.DbContexts;
using SIO.Infrastructure.EntityFrameworkCore.DbContexts;
using SIO.Infrastructure.EntityFrameworkCore.Migrations;
namespace SIO.Migrations
{
public static class MigratorExtensions
{
public static Migrator AddContexts(this Migrator migrator)
=> migrator.WithDbContext<SIOProjectionDbContext>(o => o.UseSqlServer("Server=.,1450;Initial Catalog=sio-eventpublisher-projections;User Id=sa;Password=1qaz-pl,", b => b.MigrationsAssembly("SIO.Migrations")))
.WithDbContext<SIOStoreDbContext>(o => o.UseSqlServer("Server=.,1450;Initial Catalog=sio-store;User Id=sa;Password=1qaz-pl,", b => b.MigrationsAssembly("SIO.Migrations")))
.WithDbContext<SIOEventPublisherStoreDbContext>(o => o.UseSqlServer("Server=.,1450;Initial Catalog=sio-event-eventpublisher-store;User Id=sa;Password=1qaz-pl,", b => b.MigrationsAssembly("SIO.Migrations")));
}
}
| 61.25 | 223 | 0.754082 | [
"Apache-2.0"
] | sound-it-out/sio-eventpublisher | src/SIO.Migrations/MigratorExtensions.cs | 982 | C# |
/*
Copyright (c) 2011-2012, HL7, Inc
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace Hl7.Fhir.Model
{
[System.Diagnostics.DebuggerDisplay(@"\{Value={Value}}")]
public partial class Id : IStringValue
{
public static bool IsValidValue(string value)
{
return Regex.IsMatch(value, "^" + Hl7.Fhir.Model.Id.PATTERN + "$", RegexOptions.Singleline);
}
}
}
| 40.18 | 104 | 0.744649 | [
"BSD-3-Clause"
] | AreebaAroosh/fhir-net-api | src/Hl7.Fhir.Core/Model/Id.cs | 2,011 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace UI.Web.Models.ManageViewModels
{
public class ChangePasswordViewModel
{
[Required]
[DataType(DataType.Password)]
[Display(Name = "Current password")]
public string OldPassword { get; set; }
[Required]
[StringLength(100, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "New password")]
public string NewPassword { get; set; }
[DataType(DataType.Password)]
[Display(Name = "Confirm new password")]
[Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
public string ConfirmPassword { get; set; }
public string StatusMessage { get; set; }
}
}
| 33.1 | 126 | 0.640483 | [
"MIT"
] | matheus-vieira/OracleExample | src/UniOpet/UI.Web/Models/ManageViewModels/ChangePasswordViewModel.cs | 995 | C# |
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ProblemSolving;
namespace TEST
{
[TestClass]
public class FindPointTest
{
[TestMethod]
public void ShouldReturnTrueIfPointLiesInsideTriangle()
{
var fp = new FindPoint();
var p1 = new FindPoint.Point(0, 0);
var p2 = new FindPoint.Point(0, 4);
var p3 = new FindPoint.Point(5, 0);
FindPoint.Point[] triangle = { p1, p2, p3 };
var newp = new FindPoint.Point(2, 1);
var res = fp.compute(new[] { p1, p2, p3 }, newp);
Assert.AreEqual(true, res);
}
[TestMethod]
public void ShouldReturnFalseIfPointLiesOutsideTriangle()
{
var fp = new FindPoint();
var p1 = new FindPoint.Point(0, 0);
var p2 = new FindPoint.Point(0, 4);
var p3 = new FindPoint.Point(5, 0);
FindPoint.Point[] triangle = { p1, p2, p3 };
var newp = new FindPoint.Point(3, 3);
var res = fp.compute(new[] { p1, p2, p3 }, newp);
Assert.AreEqual(false, res);
}
}
}
| 26.318182 | 65 | 0.535406 | [
"MIT"
] | pavithrarani/problem-solving-c- | TEST/FindPointTest.cs | 1,160 | C# |
using Xamarin.Forms;
namespace XF.Material.Forms.UI.Dialogs.Configurations
{
/// <summary>
/// A class that provides properties specifically for styling input dialogs.
/// </summary>
public class MaterialInputDialogConfiguration : MaterialAlertDialogConfiguration
{
/// <summary>
/// Gets or sets the maximum input length of the textfield.
/// </summary>
public int InputMaxLength { get; set; }
/// <summary>
/// Gets or sets the color of the textfield's placeholder.
/// </summary>
public Color InputPlaceholderColor { get; set; } = Color.FromHex("#99000000");
/// <summary>
/// Gets or sets the font family of the textfield's placeholder.
/// </summary>
public string InputPlaceholderFontFamily { get; set; }
/// <summary>
/// Gets or sets the color of the textfield's text.
/// </summary>
public Color InputTextColor { get; set; } = Color.FromHex("#D0000000");
/// <summary>
/// Gets or sets the font family of the textfield's text.
/// </summary>
public string InputTextFontFamily { get; set; }
/// <summary>
/// Gets or sets the input type of the textfield.
/// </summary>
public MaterialTextFieldInputType InputType { get; set; }
}
}
| 33.243902 | 86 | 0.600147 | [
"MIT"
] | SagarPanwala/XF-Material-Library | XF.Material/XF.Material.Forms/Ui/Dialogs/Configurations/MaterialInputDialogConfiguration.cs | 1,365 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Microsoft.Internal.Web.Utils;
namespace System.Web.WebPages.Html
{
public partial class HtmlHelper
{
public IHtmlString ValidationMessage(string name)
{
return ValidationMessage(name, null, null);
}
public IHtmlString ValidationMessage(string name, string message)
{
return ValidationMessage(name, message, (IDictionary<string, object>)null);
}
public IHtmlString ValidationMessage(string name, object htmlAttributes)
{
return ValidationMessage(name, null, AnonymousObjectToHtmlAttributes(htmlAttributes));
}
public IHtmlString ValidationMessage(
string name,
IDictionary<string, object> htmlAttributes
)
{
return ValidationMessage(name, null, htmlAttributes);
}
public IHtmlString ValidationMessage(string name, string message, object htmlAttributes)
{
return ValidationMessage(
name,
message,
AnonymousObjectToHtmlAttributes(htmlAttributes)
);
}
public IHtmlString ValidationMessage(
string name,
string message,
IDictionary<string, object> htmlAttributes
)
{
if (String.IsNullOrEmpty(name))
{
throw new ArgumentException(
CommonResources.Argument_Cannot_Be_Null_Or_Empty,
"name"
);
}
return BuildValidationMessage(name, message, htmlAttributes);
}
[SuppressMessage(
"Microsoft.Globalization",
"CA1308:NormalizeStringsToUppercase",
Justification = "Normalization to lowercase is a common requirement for JavaScript and HTML values"
)]
private IHtmlString BuildValidationMessage(
string name,
string message,
IDictionary<string, object> htmlAttributes
)
{
var modelState = ModelState[name];
IEnumerable<string> errors = null;
if (modelState != null)
{
errors = modelState.Errors;
}
bool hasError = errors != null && errors.Any();
if (!hasError && !UnobtrusiveJavaScriptEnabled)
{
// If unobtrusive validation is enabled, we need to generate an empty span with the "val-for" attribute"
return null;
}
else
{
string error = null;
if (hasError)
{
error = message ?? errors.First();
}
TagBuilder tagBuilder = new TagBuilder("span") { InnerHtml = Encode(error) };
tagBuilder.MergeAttributes(htmlAttributes);
if (UnobtrusiveJavaScriptEnabled)
{
bool replaceValidationMessageContents = String.IsNullOrEmpty(message);
tagBuilder.MergeAttribute("data-valmsg-for", name);
tagBuilder.MergeAttribute(
"data-valmsg-replace",
replaceValidationMessageContents.ToString().ToLowerInvariant()
);
}
tagBuilder.AddCssClass(
hasError ? ValidationMessageCssClassName : ValidationMessageValidCssClassName
);
return tagBuilder.ToHtmlString(TagRenderMode.Normal);
}
}
public IHtmlString ValidationSummary()
{
return BuildValidationSummary(
message: null,
excludeFieldErrors: false,
htmlAttributes: (IDictionary<string, object>)null
);
}
public IHtmlString ValidationSummary(string message)
{
return BuildValidationSummary(
message: message,
excludeFieldErrors: false,
htmlAttributes: (IDictionary<string, object>)null
);
}
public IHtmlString ValidationSummary(bool excludeFieldErrors)
{
return ValidationSummary(
message: null,
excludeFieldErrors: excludeFieldErrors,
htmlAttributes: (IDictionary<string, object>)null
);
}
public IHtmlString ValidationSummary(object htmlAttributes)
{
return ValidationSummary(
message: null,
excludeFieldErrors: false,
htmlAttributes: htmlAttributes
);
}
public IHtmlString ValidationSummary(IDictionary<string, object> htmlAttributes)
{
return ValidationSummary(
message: null,
excludeFieldErrors: false,
htmlAttributes: htmlAttributes
);
}
public IHtmlString ValidationSummary(string message, object htmlAttributes)
{
return ValidationSummary(
message,
excludeFieldErrors: false,
htmlAttributes: htmlAttributes
);
}
public IHtmlString ValidationSummary(
string message,
IDictionary<string, object> htmlAttributes
)
{
return ValidationSummary(
message,
excludeFieldErrors: false,
htmlAttributes: htmlAttributes
);
}
public IHtmlString ValidationSummary(
string message,
bool excludeFieldErrors,
object htmlAttributes
)
{
return ValidationSummary(
message,
excludeFieldErrors,
AnonymousObjectToHtmlAttributes(htmlAttributes)
);
}
public IHtmlString ValidationSummary(
string message,
bool excludeFieldErrors,
IDictionary<string, object> htmlAttributes
)
{
return BuildValidationSummary(message, excludeFieldErrors, htmlAttributes);
}
private IHtmlString BuildValidationSummary(
string message,
bool excludeFieldErrors,
IDictionary<string, object> htmlAttributes
)
{
IEnumerable<string> errors = null;
if (excludeFieldErrors)
{
// Review: Is there a better way to share the form field name between this and ModelStateDictionary?
var formModelState = ModelState[ModelStateDictionary.FormFieldKey];
if (formModelState != null)
{
errors = formModelState.Errors;
}
}
else
{
errors = ModelState.SelectMany(c => c.Value.Errors);
}
bool hasErrors = errors != null && errors.Any();
if (!hasErrors && (!UnobtrusiveJavaScriptEnabled || excludeFieldErrors))
{
// If no errors are found and we do not have unobtrusive validation enabled or if the summary is not meant to display field errors, don't generate the summary.
return null;
}
else
{
TagBuilder tagBuilder = new TagBuilder("div");
tagBuilder.MergeAttributes(htmlAttributes);
tagBuilder.AddCssClass(
hasErrors ? ValidationSummaryClass : ValidationSummaryValidClass
);
if (UnobtrusiveJavaScriptEnabled && !excludeFieldErrors)
{
tagBuilder.MergeAttribute("data-valmsg-summary", "true");
}
StringBuilder builder = new StringBuilder();
if (message != null)
{
builder.Append("<span>");
builder.Append(Encode(message));
builder.AppendLine("</span>");
}
builder.AppendLine("<ul>");
foreach (var error in errors)
{
builder.Append("<li>");
builder.Append(Encode(error));
builder.AppendLine("</li>");
}
builder.Append("</ul>");
tagBuilder.InnerHtml = builder.ToString();
return tagBuilder.ToHtmlString(TagRenderMode.Normal);
}
}
}
}
| 34.126437 | 175 | 0.539688 | [
"Apache-2.0"
] | belav/AspNetWebStack | src/System.Web.WebPages/Html/HtmlHelper.Validation.cs | 8,909 | C# |
using IntersectionLibrary;
using NUnit.Framework;
using System.Collections.Generic;
using System.Linq;
namespace NUnitTestProject1
{
[TestFixture]
public class TestStraightLine
{
public StraightLine test;
public StraightLine straightLine;
public RayLine rayLine1;
public RayLine rayLine2;
public LineSegment lineSegment;
public Circle circle;
public StraightLine straightLine1;
[SetUp]
public void setup()
{
List<double> args = new List<double>();
args.Add(0);
args.Add(0);
args.Add(1);
args.Add(0);
test = new StraightLine(args);
List<double> args1 = new List<double>();
args1.Add(0);
args1.Add(1);
args1.Add(1);
args1.Add(2);
straightLine = new StraightLine(args1);
List<double> args2 = new List<double>();
args2.Add(0);
args2.Add(1);
args2.Add(1);
args2.Add(2);
rayLine1 = new RayLine(args2);
List<double> args3 = new List<double>();
args3.Add(1);
args3.Add(2);
args3.Add(0);
args3.Add(1);
rayLine2 = new RayLine(args3);
List<double> args4 = new List<double>();
args4.Add(1);
args4.Add(2);
args4.Add(0);
args4.Add(1);
lineSegment = new LineSegment(args4);
List<double> args5 = new List<double>();
args5.Add(0);
args5.Add(1);
args5.Add(1);
circle = new Circle(args5);
List<double> args6 = new List<double>();
args6.Add(1);
args6.Add(1);
args6.Add(1);
args6.Add(2);
straightLine1 = new StraightLine(args6);
}
[Test]
public void TestIntersectWithStraightLine()
{
List<double> result = test.Intersect(straightLine);
List<double> answer = new List<double>();
answer.Add(-1);
answer.Add(0);
Assert.IsTrue(Enumerable.SequenceEqual(result, answer));
}
[Test]
public void TestIntersectWithRayLineNoIntersection()
{
List<double> result = test.Intersect(rayLine1);
List<double> answer = new List<double>();
Assert.IsTrue(Enumerable.SequenceEqual(result, answer));
}
[Test]
public void TestIntersectWithRayLine()
{
List<double> result = test.Intersect(rayLine2);
List<double> answer = new List<double>();
answer.Add(-1);
answer.Add(0);
Assert.IsTrue(Enumerable.SequenceEqual(result, answer));
}
[Test]
public void TestIntersectWithLineSegmentNoIntersection()
{
List<double> result = test.Intersect(lineSegment);
List<double> answer = new List<double>();
Assert.IsTrue(Enumerable.SequenceEqual(result, answer));
}
[Test]
public void TestIntersectWithCircle()
{
List<double> result = test.Intersect(circle);
List<double> answer = new List<double>();
answer.Add(0);
answer.Add(0);
Assert.IsTrue(Enumerable.SequenceEqual(result, answer));
}
[Test]
public void TestIntersectWithStraightLine1()
{
List<double> result = test.Intersect(straightLine1);
List<double> answer = new List<double>();
Assert.IsTrue(Enumerable.SequenceEqual(result, answer));
}
}
} | 29.377953 | 68 | 0.530153 | [
"MIT"
] | TheSoundWorld/SimpleIntersectionProject | TestIntersectionLibrary/TestStraightLine.cs | 3,731 | C# |
namespace Xamarin.Forms.Controls.GalleryPages.CollectionViewGalleries
{
internal class ObservableCollectionGallery : ContentPage
{
public ObservableCollectionGallery()
{
var desc = "Observable Collection Galleries";
var descriptionLabel = new Label { Text = desc, Margin = new Thickness(2, 2, 2, 2) };
Title = "Simple DataTemplate Galleries";
Content = new ScrollView
{
Content = new StackLayout
{
Children =
{
descriptionLabel,
GalleryBuilder.NavButton("Filter Items", () => new FilterCollectionView(), Navigation),
GalleryBuilder.NavButton("Add/Remove Items (List)", () =>
new ObservableCodeCollectionViewGallery(grid: false), Navigation),
GalleryBuilder.NavButton("Add/Remove Items (Grid)", () =>
new ObservableCodeCollectionViewGallery(), Navigation),
GalleryBuilder.NavButton("Add/Remove Items (Grid, initially empty)", () =>
new ObservableCodeCollectionViewGallery(initialItems: 0), Navigation),
GalleryBuilder.NavButton("Add/Remove Items (List, initially empty)", () =>
new ObservableCodeCollectionViewGallery(grid: false, initialItems: 0), Navigation),
GalleryBuilder.NavButton("Multi-item add/remove, no index",
() => new ObservableMultiItemCollectionViewGallery(), Navigation),
GalleryBuilder.NavButton("Multi-item add/remove, with index",
() => new ObservableMultiItemCollectionViewGallery(withIndex: true), Navigation),
GalleryBuilder.NavButton("Reset", () => new ObservableCollectionResetGallery(), Navigation),
GalleryBuilder.NavButton("Add Items with timer to Empty Collection", () =>
new ObservableCodeCollectionViewGallery(grid: false, initialItems: 0, addItemsWithTimer: true), Navigation),
GalleryBuilder.NavButton("Scroll mode Keep items in view", () =>
new ObservableCodeCollectionViewGallery(grid: false, initialItems: 0, addItemsWithTimer: true, scrollMode: ItemsUpdatingScrollMode.KeepItemsInView), Navigation),
GalleryBuilder.NavButton("Scroll mode Keep scroll offset", () =>
new ObservableCodeCollectionViewGallery(grid: false, initialItems: 0, addItemsWithTimer: true, scrollMode: ItemsUpdatingScrollMode.KeepScrollOffset), Navigation),
GalleryBuilder.NavButton("Scroll mode Keep last item in view", () =>
new ObservableCodeCollectionViewGallery(grid: false, initialItems: 0, addItemsWithTimer: true, scrollMode: ItemsUpdatingScrollMode.KeepLastItemInView), Navigation)
}
}
};
}
}
} | 43.186441 | 189 | 0.722135 | [
"MIT"
] | Alan-love/Xamarin.Forms | Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/ObservableCollectionGallery.cs | 2,550 | C# |
using ExpenseTracer.Domain.Common;
namespace ExpenseTracer.Domain.Entities
{
/// <summary>
/// Represents an expense category
/// </summary>
public class Category : IEntity
{
/// <summary>
/// Gets or sets the unique identifier of the category
/// </summary>
public int Id { get; set; }
/// <summary>
/// Gets or sets the name of the category
/// </summary>
public string Name { get; set; }
}
}
| 23.142857 | 62 | 0.559671 | [
"Unlicense"
] | adanek/ExpenseTracer | ExpenseTracer.Domain/Entities/Category.cs | 488 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using AutoMapper;
using DatabaseExtension.Translator;
using UserService.Proto;
namespace UserService.Main.Automapper
{
/// <summary>
/// Конвертер сущности NotificationSetting
/// </summary>
public class RoleNotificationSettingConvertor :
ITypeConverter<Core.Entity.RoleNotificationSetting, RoleNotifySetting>,
ITypeConverter<RoleNotifySetting, Core.Entity.RoleNotificationSetting>,
ITypeConverter<RoleNotifySettingCreateCommand, Core.Entity.RoleNotificationSetting>,
ITypeConverter<RoleNotifySettingUpdateCommand, Core.Entity.RoleNotificationSetting>
{
private readonly ITranslator _translator;
/// <summary>
/// Конвертер сущности NotificationSetting
/// </summary>
/// <param name="translator"></param>
public RoleNotificationSettingConvertor(ITranslator translator)
{
_translator = translator;
}
/// <summary>
/// Конвертер сущности NotificationSetting
/// </summary>
/// <param name="notificationSetting"></param>
/// <param name="destination"></param>
/// <param name="context"></param>
/// <returns></returns>
public RoleNotifySetting Convert(Core.Entity.RoleNotificationSetting notificationSetting, RoleNotifySetting destination, ResolutionContext context)
{
IDictionary<Core.Entity.TargetNotify, string> targetNoties = _translator.GetEnumText<Core.Entity.TargetNotify>();
Core.Entity.TargetNotify[] targets = notificationSetting.TargetNotifies.ToArray();
notificationSetting.ContractProfile = null;
RoleNotifySetting protoNotifySetting = new()
{
ContractProfileId = notificationSetting.ContractProfileId.ToString(),
Enable = notificationSetting.Enable,
Id = notificationSetting.Id.ToString(),
RoleId = notificationSetting.RoleId.ToString(),
SubdivisionId = notificationSetting.SubdivisionId.ToString(),
TargetNotifies = { targetNoties.Where(e => targets.Contains(e.Key)).Select(e => e.Value) }
};
return protoNotifySetting;
}
/// <summary>
/// Конвертер сущности NotificationSetting
/// </summary>
/// <param name="notificationSetting"></param>
/// <param name="destination"></param>
/// <param name="context"></param>
/// <returns></returns>
public Core.Entity.RoleNotificationSetting Convert(RoleNotifySetting notificationSetting, Core.Entity.RoleNotificationSetting destination, ResolutionContext context)
{
IDictionary<Core.Entity.TargetNotify, string> targetNoties = _translator.GetEnumText<Core.Entity.TargetNotify>();
Core.Entity.RoleNotificationSetting notification = new()
{
Id = Guid.Parse(notificationSetting.Id),
Enable = notificationSetting.Enable,
ContractProfileId = Guid.Parse(notificationSetting.ContractProfileId),
RoleId = Guid.Parse(notificationSetting.RoleId),
SubdivisionId = Guid.Parse(notificationSetting.SubdivisionId),
TargetNotifies = targetNoties.Where(x => notificationSetting.TargetNotifies.Contains(x.Value)).Select(s => s.Key),
};
return notification;
}
/// <summary>
/// Конвертер сущности NotificationSetting
/// </summary>
/// <param name="settingCreateCommand"></param>
/// <param name="destination"></param>
/// <param name="context"></param>
/// <returns></returns>
public Core.Entity.RoleNotificationSetting Convert(RoleNotifySettingCreateCommand settingCreateCommand, Core.Entity.RoleNotificationSetting destination, ResolutionContext context)
{
RoleNotifySetting notifySetting = new RoleNotifySetting
{
Id = Guid.NewGuid().ToString(),
ContractProfileId = settingCreateCommand.ContractProfileId,
Enable = settingCreateCommand.Enable,
RoleId = settingCreateCommand.RoleId,
SubdivisionId = settingCreateCommand.SubdivisionId,
TargetNotifies = { settingCreateCommand.TargetNotifies },
};
return Convert(notifySetting, destination, context);
}
/// <summary>
/// Конвертер сущности NotificationSetting
/// </summary>
/// <param name="settingUpdateCommand"></param>
/// <param name="destination"></param>
/// <param name="context"></param>
/// <returns></returns>
public Core.Entity.RoleNotificationSetting Convert(RoleNotifySettingUpdateCommand settingUpdateCommand, Core.Entity.RoleNotificationSetting destination, ResolutionContext context)
{
RoleNotifySetting notifySetting = new()
{
Id = settingUpdateCommand.Id,
ContractProfileId = Guid.Empty.ToString(),
Enable = settingUpdateCommand.Enable,
RoleId = settingUpdateCommand.RoleId,
SubdivisionId = settingUpdateCommand.SubdivisionId,
TargetNotifies = { settingUpdateCommand.TargetNotifies },
};
return Convert(notifySetting, destination, context);
}
}
}
| 42.4 | 187 | 0.642598 | [
"Apache-2.0"
] | BergenIt/user-service | UserService.Main/UserService.Main/Automapper/RoleNotificationSettingConvertor.cs | 5,614 | C# |
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Research.EntityFrameworkCore;
namespace Research.Migrations
{
[DbContext(typeof(ResearchDbContext))]
partial class ResearchDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("Abp.Application.Editions.Edition", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<long?>("DeleterUserId");
b.Property<DateTime?>("DeletionTime");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(64);
b.Property<bool>("IsDeleted");
b.Property<DateTime?>("LastModificationTime");
b.Property<long?>("LastModifierUserId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(32);
b.HasKey("Id");
b.ToTable("AbpEditions");
});
modelBuilder.Entity("Abp.Application.Features.FeatureSetting", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<string>("Discriminator")
.IsRequired();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<int?>("TenantId");
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2000);
b.HasKey("Id");
b.ToTable("AbpFeatures");
b.HasDiscriminator<string>("Discriminator").HasValue("FeatureSetting");
});
modelBuilder.Entity("Abp.Auditing.AuditLog", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("BrowserInfo")
.HasMaxLength(512);
b.Property<string>("ClientIpAddress")
.HasMaxLength(64);
b.Property<string>("ClientName")
.HasMaxLength(128);
b.Property<string>("CustomData")
.HasMaxLength(2000);
b.Property<string>("Exception")
.HasMaxLength(2000);
b.Property<int>("ExecutionDuration");
b.Property<DateTime>("ExecutionTime");
b.Property<int?>("ImpersonatorTenantId");
b.Property<long?>("ImpersonatorUserId");
b.Property<string>("MethodName")
.HasMaxLength(256);
b.Property<string>("Parameters")
.HasMaxLength(1024);
b.Property<string>("ReturnValue");
b.Property<string>("ServiceName")
.HasMaxLength(256);
b.Property<int?>("TenantId");
b.Property<long?>("UserId");
b.HasKey("Id");
b.HasIndex("TenantId", "ExecutionDuration");
b.HasIndex("TenantId", "ExecutionTime");
b.HasIndex("TenantId", "UserId");
b.ToTable("AbpAuditLogs");
});
modelBuilder.Entity("Abp.Authorization.PermissionSetting", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<string>("Discriminator")
.IsRequired();
b.Property<bool>("IsGranted");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<int?>("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId", "Name");
b.ToTable("AbpPermissions");
b.HasDiscriminator<string>("Discriminator").HasValue("PermissionSetting");
});
modelBuilder.Entity("Abp.Authorization.Roles.RoleClaim", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.HasMaxLength(256);
b.Property<string>("ClaimValue");
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<int>("RoleId");
b.Property<int?>("TenantId");
b.HasKey("Id");
b.HasIndex("RoleId");
b.HasIndex("TenantId", "ClaimType");
b.ToTable("AbpRoleClaims");
});
modelBuilder.Entity("Abp.Authorization.Users.UserAccount", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<long?>("DeleterUserId");
b.Property<DateTime?>("DeletionTime");
b.Property<string>("EmailAddress")
.HasMaxLength(256);
b.Property<bool>("IsDeleted");
b.Property<DateTime?>("LastModificationTime");
b.Property<long?>("LastModifierUserId");
b.Property<int?>("TenantId");
b.Property<long>("UserId");
b.Property<long?>("UserLinkId");
b.Property<string>("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("EmailAddress");
b.HasIndex("UserName");
b.HasIndex("TenantId", "EmailAddress");
b.HasIndex("TenantId", "UserId");
b.HasIndex("TenantId", "UserName");
b.ToTable("AbpUserAccounts");
});
modelBuilder.Entity("Abp.Authorization.Users.UserClaim", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.HasMaxLength(256);
b.Property<string>("ClaimValue");
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<int?>("TenantId");
b.Property<long>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.HasIndex("TenantId", "ClaimType");
b.ToTable("AbpUserClaims");
});
modelBuilder.Entity("Abp.Authorization.Users.UserLogin", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("LoginProvider")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(256);
b.Property<int?>("TenantId");
b.Property<long>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.HasIndex("TenantId", "UserId");
b.HasIndex("TenantId", "LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins");
});
modelBuilder.Entity("Abp.Authorization.Users.UserLoginAttempt", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("BrowserInfo")
.HasMaxLength(512);
b.Property<string>("ClientIpAddress")
.HasMaxLength(64);
b.Property<string>("ClientName")
.HasMaxLength(128);
b.Property<DateTime>("CreationTime");
b.Property<byte>("Result");
b.Property<string>("TenancyName")
.HasMaxLength(64);
b.Property<int?>("TenantId");
b.Property<long?>("UserId");
b.Property<string>("UserNameOrEmailAddress")
.HasMaxLength(255);
b.HasKey("Id");
b.HasIndex("UserId", "TenantId");
b.HasIndex("TenancyName", "UserNameOrEmailAddress", "Result");
b.ToTable("AbpUserLoginAttempts");
});
modelBuilder.Entity("Abp.Authorization.Users.UserOrganizationUnit", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<bool>("IsDeleted");
b.Property<long>("OrganizationUnitId");
b.Property<int?>("TenantId");
b.Property<long>("UserId");
b.HasKey("Id");
b.HasIndex("TenantId", "OrganizationUnitId");
b.HasIndex("TenantId", "UserId");
b.ToTable("AbpUserOrganizationUnits");
});
modelBuilder.Entity("Abp.Authorization.Users.UserRole", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<int>("RoleId");
b.Property<int?>("TenantId");
b.Property<long>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.HasIndex("TenantId", "RoleId");
b.HasIndex("TenantId", "UserId");
b.ToTable("AbpUserRoles");
});
modelBuilder.Entity("Abp.Authorization.Users.UserToken", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime?>("ExpireDate");
b.Property<string>("LoginProvider")
.HasMaxLength(128);
b.Property<string>("Name")
.HasMaxLength(128);
b.Property<int?>("TenantId");
b.Property<long>("UserId");
b.Property<string>("Value")
.HasMaxLength(512);
b.HasKey("Id");
b.HasIndex("UserId");
b.HasIndex("TenantId", "UserId");
b.ToTable("AbpUserTokens");
});
modelBuilder.Entity("Abp.BackgroundJobs.BackgroundJobInfo", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<bool>("IsAbandoned");
b.Property<string>("JobArgs")
.IsRequired()
.HasMaxLength(1048576);
b.Property<string>("JobType")
.IsRequired()
.HasMaxLength(512);
b.Property<DateTime?>("LastTryTime");
b.Property<DateTime>("NextTryTime");
b.Property<byte>("Priority");
b.Property<short>("TryCount");
b.HasKey("Id");
b.HasIndex("IsAbandoned", "NextTryTime");
b.ToTable("AbpBackgroundJobs");
});
modelBuilder.Entity("Abp.Configuration.Setting", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<DateTime?>("LastModificationTime");
b.Property<long?>("LastModifierUserId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<int?>("TenantId");
b.Property<long?>("UserId");
b.Property<string>("Value")
.HasMaxLength(2000);
b.HasKey("Id");
b.HasIndex("UserId");
b.HasIndex("TenantId", "Name");
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Abp.EntityHistory.EntityChange", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("ChangeTime");
b.Property<byte>("ChangeType");
b.Property<long>("EntityChangeSetId");
b.Property<string>("EntityId")
.HasMaxLength(48);
b.Property<string>("EntityTypeFullName")
.HasMaxLength(192);
b.Property<int?>("TenantId");
b.HasKey("Id");
b.HasIndex("EntityChangeSetId");
b.HasIndex("EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
});
modelBuilder.Entity("Abp.EntityHistory.EntityChangeSet", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("BrowserInfo")
.HasMaxLength(512);
b.Property<string>("ClientIpAddress")
.HasMaxLength(64);
b.Property<string>("ClientName")
.HasMaxLength(128);
b.Property<DateTime>("CreationTime");
b.Property<string>("ExtensionData");
b.Property<int?>("ImpersonatorTenantId");
b.Property<long?>("ImpersonatorUserId");
b.Property<string>("Reason")
.HasMaxLength(256);
b.Property<int?>("TenantId");
b.Property<long?>("UserId");
b.HasKey("Id");
b.HasIndex("TenantId", "CreationTime");
b.HasIndex("TenantId", "Reason");
b.HasIndex("TenantId", "UserId");
b.ToTable("AbpEntityChangeSets");
});
modelBuilder.Entity("Abp.EntityHistory.EntityPropertyChange", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<long>("EntityChangeId");
b.Property<string>("NewValue")
.HasMaxLength(512);
b.Property<string>("OriginalValue")
.HasMaxLength(512);
b.Property<string>("PropertyName")
.HasMaxLength(96);
b.Property<string>("PropertyTypeFullName")
.HasMaxLength(192);
b.Property<int?>("TenantId");
b.HasKey("Id");
b.HasIndex("EntityChangeId");
b.ToTable("AbpEntityPropertyChanges");
});
modelBuilder.Entity("Abp.Localization.ApplicationLanguage", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<long?>("DeleterUserId");
b.Property<DateTime?>("DeletionTime");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(64);
b.Property<string>("Icon")
.HasMaxLength(128);
b.Property<bool>("IsDeleted");
b.Property<bool>("IsDisabled");
b.Property<DateTime?>("LastModificationTime");
b.Property<long?>("LastModifierUserId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(10);
b.Property<int?>("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId", "Name");
b.ToTable("AbpLanguages");
});
modelBuilder.Entity("Abp.Localization.ApplicationLanguageText", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("LanguageName")
.IsRequired()
.HasMaxLength(10);
b.Property<DateTime?>("LastModificationTime");
b.Property<long?>("LastModifierUserId");
b.Property<string>("Source")
.IsRequired()
.HasMaxLength(128);
b.Property<int?>("TenantId");
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(67108864);
b.HasKey("Id");
b.HasIndex("TenantId", "Source", "LanguageName", "Key");
b.ToTable("AbpLanguageTexts");
});
modelBuilder.Entity("Abp.Notifications.NotificationInfo", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<string>("Data")
.HasMaxLength(1048576);
b.Property<string>("DataTypeName")
.HasMaxLength(512);
b.Property<string>("EntityId")
.HasMaxLength(96);
b.Property<string>("EntityTypeAssemblyQualifiedName")
.HasMaxLength(512);
b.Property<string>("EntityTypeName")
.HasMaxLength(250);
b.Property<string>("ExcludedUserIds")
.HasMaxLength(131072);
b.Property<string>("NotificationName")
.IsRequired()
.HasMaxLength(96);
b.Property<byte>("Severity");
b.Property<string>("TenantIds")
.HasMaxLength(131072);
b.Property<string>("UserIds")
.HasMaxLength(131072);
b.HasKey("Id");
b.ToTable("AbpNotifications");
});
modelBuilder.Entity("Abp.Notifications.NotificationSubscriptionInfo", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<string>("EntityId")
.HasMaxLength(96);
b.Property<string>("EntityTypeAssemblyQualifiedName")
.HasMaxLength(512);
b.Property<string>("EntityTypeName")
.HasMaxLength(250);
b.Property<string>("NotificationName")
.HasMaxLength(96);
b.Property<int?>("TenantId");
b.Property<long>("UserId");
b.HasKey("Id");
b.HasIndex("NotificationName", "EntityTypeName", "EntityId", "UserId");
b.HasIndex("TenantId", "NotificationName", "EntityTypeName", "EntityId", "UserId");
b.ToTable("AbpNotificationSubscriptions");
});
modelBuilder.Entity("Abp.Notifications.TenantNotificationInfo", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<string>("Data")
.HasMaxLength(1048576);
b.Property<string>("DataTypeName")
.HasMaxLength(512);
b.Property<string>("EntityId")
.HasMaxLength(96);
b.Property<string>("EntityTypeAssemblyQualifiedName")
.HasMaxLength(512);
b.Property<string>("EntityTypeName")
.HasMaxLength(250);
b.Property<string>("NotificationName")
.IsRequired()
.HasMaxLength(96);
b.Property<byte>("Severity");
b.Property<int?>("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId");
b.ToTable("AbpTenantNotifications");
});
modelBuilder.Entity("Abp.Notifications.UserNotificationInfo", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<int>("State");
b.Property<int?>("TenantId");
b.Property<Guid>("TenantNotificationId");
b.Property<long>("UserId");
b.HasKey("Id");
b.HasIndex("UserId", "State", "CreationTime");
b.ToTable("AbpUserNotifications");
});
modelBuilder.Entity("Abp.Organizations.OrganizationUnit", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(95);
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<long?>("DeleterUserId");
b.Property<DateTime?>("DeletionTime");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(128);
b.Property<bool>("IsDeleted");
b.Property<DateTime?>("LastModificationTime");
b.Property<long?>("LastModifierUserId");
b.Property<long?>("ParentId");
b.Property<int?>("TenantId");
b.HasKey("Id");
b.HasIndex("ParentId");
b.HasIndex("TenantId", "Code");
b.ToTable("AbpOrganizationUnits");
});
modelBuilder.Entity("Abp.Organizations.OrganizationUnitRole", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<bool>("IsDeleted");
b.Property<long>("OrganizationUnitId");
b.Property<int>("RoleId");
b.Property<int?>("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId", "OrganizationUnitId");
b.HasIndex("TenantId", "RoleId");
b.ToTable("AbpOrganizationUnitRoles");
});
modelBuilder.Entity("Research.Authorization.Roles.Role", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(128);
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<long?>("DeleterUserId");
b.Property<DateTime?>("DeletionTime");
b.Property<string>("Description")
.HasMaxLength(5000);
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(64);
b.Property<bool>("IsDefault");
b.Property<bool>("IsDeleted");
b.Property<bool>("IsStatic");
b.Property<DateTime?>("LastModificationTime");
b.Property<long?>("LastModifierUserId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(32);
b.Property<string>("NormalizedName")
.IsRequired()
.HasMaxLength(32);
b.Property<int?>("TenantId");
b.HasKey("Id");
b.HasIndex("CreatorUserId");
b.HasIndex("DeleterUserId");
b.HasIndex("LastModifierUserId");
b.HasIndex("TenantId", "NormalizedName");
b.ToTable("AbpRoles");
});
modelBuilder.Entity("Research.Authorization.Users.User", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AccessFailedCount");
b.Property<string>("AuthenticationSource")
.HasMaxLength(64);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(128);
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<long?>("DeleterUserId");
b.Property<DateTime?>("DeletionTime");
b.Property<string>("EmailAddress")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("EmailConfirmationCode")
.HasMaxLength(328);
b.Property<bool>("IsActive");
b.Property<bool>("IsDeleted");
b.Property<bool>("IsEmailConfirmed");
b.Property<bool>("IsLockoutEnabled");
b.Property<bool>("IsPhoneNumberConfirmed");
b.Property<bool>("IsTwoFactorEnabled");
b.Property<DateTime?>("LastModificationTime");
b.Property<long?>("LastModifierUserId");
b.Property<DateTime?>("LockoutEndDateUtc");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64);
b.Property<string>("NormalizedEmailAddress")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("Password")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("PasswordResetCode")
.HasMaxLength(328);
b.Property<string>("PhoneNumber")
.HasMaxLength(32);
b.Property<string>("SecurityStamp")
.HasMaxLength(128);
b.Property<string>("Surname")
.IsRequired()
.HasMaxLength(64);
b.Property<int?>("TenantId");
b.Property<string>("UserName")
.IsRequired()
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("CreatorUserId");
b.HasIndex("DeleterUserId");
b.HasIndex("LastModifierUserId");
b.HasIndex("TenantId", "NormalizedEmailAddress");
b.HasIndex("TenantId", "NormalizedUserName");
b.ToTable("AbpUsers");
});
modelBuilder.Entity("Research.MultiTenancy.Tenant", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConnectionString")
.HasMaxLength(1024);
b.Property<DateTime>("CreationTime");
b.Property<long?>("CreatorUserId");
b.Property<long?>("DeleterUserId");
b.Property<DateTime?>("DeletionTime");
b.Property<int?>("EditionId");
b.Property<bool>("IsActive");
b.Property<bool>("IsDeleted");
b.Property<DateTime?>("LastModificationTime");
b.Property<long?>("LastModifierUserId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("TenancyName")
.IsRequired()
.HasMaxLength(64);
b.HasKey("Id");
b.HasIndex("CreatorUserId");
b.HasIndex("DeleterUserId");
b.HasIndex("EditionId");
b.HasIndex("LastModifierUserId");
b.HasIndex("TenancyName");
b.ToTable("AbpTenants");
});
modelBuilder.Entity("Research.PropertyInfoes.PropertyInfo", b =>
{
b.Property<int?>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ColumnFullName");
b.Property<string>("ColumnName");
b.Property<string>("Constructor");
b.Property<long?>("DomainID");
b.Property<string>("DomainName");
b.Property<byte?>("IsReNew");
b.Property<byte?>("IsZeroModule");
b.Property<long?>("OrdinalPostion");
b.Property<string>("PropertyFullName");
b.Property<string>("PropertyName");
b.Property<string>("PropertyNameWithColumn");
b.Property<string>("PropertyType");
b.Property<string>("Scope");
b.HasKey("Id");
b.ToTable("PropertyInfos");
});
modelBuilder.Entity("Research.PropertyInfoes.SchemaColumn", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("COLUMN_NAME");
b.Property<string>("COLUMN_TYPE");
b.Property<string>("ColumnFullName");
b.Property<string>("DATA_TYPE");
b.Property<long>("DomainID");
b.Property<long>("ORDINAL_POSITION");
b.Property<string>("TABLE_NAME");
b.Property<string>("TABLE_SCHEMA");
b.HasKey("Id");
b.ToTable("SchemaColumns");
});
modelBuilder.Entity("Abp.Application.Features.EditionFeatureSetting", b =>
{
b.HasBaseType("Abp.Application.Features.FeatureSetting");
b.Property<int>("EditionId");
b.HasIndex("EditionId", "Name");
b.ToTable("AbpFeatures");
b.HasDiscriminator().HasValue("EditionFeatureSetting");
});
modelBuilder.Entity("Abp.MultiTenancy.TenantFeatureSetting", b =>
{
b.HasBaseType("Abp.Application.Features.FeatureSetting");
b.HasIndex("TenantId", "Name");
b.ToTable("AbpFeatures");
b.HasDiscriminator().HasValue("TenantFeatureSetting");
});
modelBuilder.Entity("Abp.Authorization.Roles.RolePermissionSetting", b =>
{
b.HasBaseType("Abp.Authorization.PermissionSetting");
b.Property<int>("RoleId");
b.HasIndex("RoleId");
b.ToTable("AbpPermissions");
b.HasDiscriminator().HasValue("RolePermissionSetting");
});
modelBuilder.Entity("Abp.Authorization.Users.UserPermissionSetting", b =>
{
b.HasBaseType("Abp.Authorization.PermissionSetting");
b.Property<long>("UserId");
b.HasIndex("UserId");
b.ToTable("AbpPermissions");
b.HasDiscriminator().HasValue("UserPermissionSetting");
});
modelBuilder.Entity("Abp.Authorization.Roles.RoleClaim", b =>
{
b.HasOne("Research.Authorization.Roles.Role")
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Abp.Authorization.Users.UserClaim", b =>
{
b.HasOne("Research.Authorization.Users.User")
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Abp.Authorization.Users.UserLogin", b =>
{
b.HasOne("Research.Authorization.Users.User")
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Abp.Authorization.Users.UserRole", b =>
{
b.HasOne("Research.Authorization.Users.User")
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Abp.Authorization.Users.UserToken", b =>
{
b.HasOne("Research.Authorization.Users.User")
.WithMany("Tokens")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Abp.Configuration.Setting", b =>
{
b.HasOne("Research.Authorization.Users.User")
.WithMany("Settings")
.HasForeignKey("UserId");
});
modelBuilder.Entity("Abp.EntityHistory.EntityChange", b =>
{
b.HasOne("Abp.EntityHistory.EntityChangeSet")
.WithMany("EntityChanges")
.HasForeignKey("EntityChangeSetId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Abp.EntityHistory.EntityPropertyChange", b =>
{
b.HasOne("Abp.EntityHistory.EntityChange")
.WithMany("PropertyChanges")
.HasForeignKey("EntityChangeId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Abp.Organizations.OrganizationUnit", b =>
{
b.HasOne("Abp.Organizations.OrganizationUnit", "Parent")
.WithMany("Children")
.HasForeignKey("ParentId");
});
modelBuilder.Entity("Research.Authorization.Roles.Role", b =>
{
b.HasOne("Research.Authorization.Users.User", "CreatorUser")
.WithMany()
.HasForeignKey("CreatorUserId");
b.HasOne("Research.Authorization.Users.User", "DeleterUser")
.WithMany()
.HasForeignKey("DeleterUserId");
b.HasOne("Research.Authorization.Users.User", "LastModifierUser")
.WithMany()
.HasForeignKey("LastModifierUserId");
});
modelBuilder.Entity("Research.Authorization.Users.User", b =>
{
b.HasOne("Research.Authorization.Users.User", "CreatorUser")
.WithMany()
.HasForeignKey("CreatorUserId");
b.HasOne("Research.Authorization.Users.User", "DeleterUser")
.WithMany()
.HasForeignKey("DeleterUserId");
b.HasOne("Research.Authorization.Users.User", "LastModifierUser")
.WithMany()
.HasForeignKey("LastModifierUserId");
});
modelBuilder.Entity("Research.MultiTenancy.Tenant", b =>
{
b.HasOne("Research.Authorization.Users.User", "CreatorUser")
.WithMany()
.HasForeignKey("CreatorUserId");
b.HasOne("Research.Authorization.Users.User", "DeleterUser")
.WithMany()
.HasForeignKey("DeleterUserId");
b.HasOne("Abp.Application.Editions.Edition", "Edition")
.WithMany()
.HasForeignKey("EditionId");
b.HasOne("Research.Authorization.Users.User", "LastModifierUser")
.WithMany()
.HasForeignKey("LastModifierUserId");
});
modelBuilder.Entity("Abp.Application.Features.EditionFeatureSetting", b =>
{
b.HasOne("Abp.Application.Editions.Edition", "Edition")
.WithMany()
.HasForeignKey("EditionId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Abp.Authorization.Roles.RolePermissionSetting", b =>
{
b.HasOne("Research.Authorization.Roles.Role")
.WithMany("Permissions")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Abp.Authorization.Users.UserPermissionSetting", b =>
{
b.HasOne("Research.Authorization.Users.User")
.WithMany("Permissions")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}
| 31.657576 | 108 | 0.439408 | [
"MIT"
] | PowerDG/Hundred-Micro | PropertyTools/4.6.0/aspnet-core/src/Research.EntityFrameworkCore/Migrations/ResearchDbContextModelSnapshot.cs | 41,790 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.